diff options
author | IOhannes m zmölnig <zmoelnig@users.sourceforge.net> | 2008-01-23 15:24:53 +0000 |
---|---|---|
committer | IOhannes m zmölnig <zmoelnig@users.sourceforge.net> | 2008-01-23 15:24:53 +0000 |
commit | 4e4a3922b02d5fe62e4411e2b17bd47c9e33da47 (patch) | |
tree | e630d956b9618271400f0ab817edd7d59c543db3 /src/Makefile | |
parent | eab14933747390c5f6029e87edb35af4d402baaf (diff) |
build aliases when not building a library
svn path=/trunk/externals/iem/iemmatrix/; revision=9156
Diffstat (limited to 'src/Makefile')
-rw-r--r-- | src/Makefile | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/src/Makefile b/src/Makefile index 1c95077..d304b02 100644 --- a/src/Makefile +++ b/src/Makefile @@ -7,11 +7,20 @@ default: all -include Make.config +VPATH = .:../alias/ + +## if $(BUILDLIBRARY) is defined, we need to include the aliases +ifeq "$(BUILDLIBRARY)" "" + ALIASOBJECTSOURCES=$(subst ../alias/,,$(sort $(filter %.c, $(wildcard ../alias/*.c)))) +else + ALIASOBJECTSOURCES= +endif + TESTDIR=../tests HELPERSOURCES=$(LIBRARY_NAME)_sources.c $(LIBRARY_NAME).c -OBJECTSOURCES=$(sort $(filter-out $(HELPERSOURCES), $(filter %.c, $(wildcard *.c)))) +OBJECTSOURCES=$(sort $(filter-out $(HELPERSOURCES), $(filter %.c, $(wildcard *.c)))) $(ALIASOBJECTSOURCES) SOURCES=$(OBJECTSOURCES) $(HELPERSOURCES) @@ -47,6 +56,13 @@ TARGETS = $(SOURCES:.c=.o) OBJECTS = $(OBJECTSOURCES:.c=.$(EXT)) + +debug: + @echo sources $(SOURCES) + @echo alias $(ALIASOBJECTSOURCES) + @echo targets $(TARGETS) + @echo objects $(OBJECTS) + ## if $(BUILDLIBRARY) is defined, we build everything as a single library ## else we build separate externals ifneq "$(BUILDLIBRARY)" "" @@ -65,7 +81,7 @@ $(LIBRARY_NAME): $(TARGETS) $(LIBRARY_NAME)_sources.c $(LIBRARY_NAME)_sources.h $(STRIP) $(STRIPFLAGS) $@.$(EXT) $(TARGETS): %.o : %.c - $(CC) $(LIBRARY_CFLAGS) -c -o $@ $*.c + $(CC) $(LIBRARY_CFLAGS) -c -o $@ $< externals: $(OBJECTS) |