diff options
Diffstat (limited to 'mdk-stage1/bzlib')
-rw-r--r-- | mdk-stage1/bzlib/Makefile | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/mdk-stage1/bzlib/Makefile b/mdk-stage1/bzlib/Makefile index 3015ccc2d..6b4f29ffc 100644 --- a/mdk-stage1/bzlib/Makefile +++ b/mdk-stage1/bzlib/Makefile @@ -18,30 +18,38 @@ top_dir = .. include $(top_dir)/Makefile.common -all: libbzlib.a libbzlib-DIET.a +LIBNAME = libbzlib -clean: - rm -f *.o *.a +OBJS = blocksort.o bzlib.o compress.o crctable.o decompress.o huffman.o randtable.o -FLAGS = -Wall -Werror -Os -fomit-frame-pointer -c +DEFS = +INCS = -OBJS = blocksort.o bzlib.o compress.o crctable.o decompress.o huffman.o randtable.o -OBJS-DIET = $(subst .o,-DIET.o,$(OBJS)) +TARGETS = $(LIBNAME).a + +ifeq (DIETLIBC, $(L)) +TARGETS += $(LIBNAME)-DIET.a +endif + +all: $(TARGETS) -libbzlib.a: $(OBJS) +clean: + rm -f *.o *.a + +OBJS-DIET = $(subst .o,-DIET.o,$(OBJS)) + +$(LIBNAME).a: $(OBJS) ar -cru $@ $^ ranlib $@ -libbzlib-DIET.a: $(OBJS-DIET) +$(LIBNAME)-DIET.a: $(OBJS-DIET) ar -cru $@ $^ ranlib $@ - $(OBJS): %.o: %.c - gcc $(FLAGS) $(GLIBC_INCLUDES) -c $< -o $@ + gcc $(CFLAGS) $(DEFS) $(INCS) $(GLIBC_INCLUDES) -c $< -o $@ $(OBJS-DIET): %-DIET.o: %.c - gcc $(FLAGS) $(DIETLIBC_INCLUDES) -c $< -o $@ - + gcc $(CFLAGS) $(DEFS) $(INCS) $(DIETLIBC_INCLUDES) -c $< -o $@ |