From 81dd6aadefa06530e4faf804c8ca4352c86232c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?IOhannes=20m=20zm=C3=B6lnig?= Date: Tue, 6 Jun 2006 11:52:20 +0000 Subject: added build (and configure) target for compilation as single externals (as opposed to 1 big library) svn path=/trunk/externals/zexy/; revision=5174 --- src/Makefile | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'src/Makefile') diff --git a/src/Makefile b/src/Makefile index e0b3c25..60dd75f 100644 --- a/src/Makefile +++ b/src/Makefile @@ -44,17 +44,30 @@ endif TARGETS = $(SOURCES:.c=.o) +OBJECTS = $(SOURCES:.c=) +## if $(BUILDLIBRARY) is defined, we build everything as a single library +## else we build separate externals +ifneq "$(BUILDLIBRARY)" "" all: $(LIBNAME) cp $(LIBNAME).$(EXT) .. +else +all: externals +endif + + +$(OBJECTS): $(TARGETS) + $(LD) $(LFLAGS) -o $@.$(EXT) $@.o $(LIBS) + $(STRIP) $(STRIPFLAGS) $@.$(EXT) $(LIBNAME): $(TARGETS) z_zexy.c z_zexy.h - $(LD) $(LFLAGS) -o $(LIBNAME).$(EXT) *.o $(LIBS) - $(STRIP) $(STRIPFLAGS) $(LIBNAME).$(EXT) + $(LD) $(LFLAGS) -o $@.$(EXT) *.o $(LIBS) + $(STRIP) $(STRIPFLAGS) $@.$(EXT) $(TARGETS): %.o : %.c $(CC) $(Z_CFLAGS) -c -o $@ $*.c +externals: $(OBJECTS) clean: -rm -f *.$(EXT) *.o -- cgit v1.2.1