From 0879c2dadfe9f6998bdcddf837918ed8617d17b4 Mon Sep 17 00:00:00 2001 From: Matthias Badaire Date: Wed, 30 May 2001 14:31:23 +0000 Subject: - allow build on ia64 - have CFLAGS centralized in Makefile.common (should help ports such as alpha) - better looking sub makefiles --- mdk-stage1/newt/Makefile | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) (limited to 'mdk-stage1/newt/Makefile') diff --git a/mdk-stage1/newt/Makefile b/mdk-stage1/newt/Makefile index c4e6a7207..171bcf0cb 100644 --- a/mdk-stage1/newt/Makefile +++ b/mdk-stage1/newt/Makefile @@ -18,32 +18,39 @@ top_dir = .. include $(top_dir)/Makefile.common -all: libnewt.a libnewt-DIET.a +LIBNAME = libnewt -clean: - rm -f *.o *.a +OBJS = newt.o button.o form.o checkbox.o entry.o label.o listbox.o scrollbar.o textbox.o scale.o grid.o windows.o buttonbar.o checkboxtree.o -FLAGS = -Wall -Werror -Os -fomit-frame-pointer -DVERSION=\"0.50.19\" -c +DEFS = -DVERSION=\"0.50.19\" INCS = -I../slang -OBJS = newt.o button.o form.o checkbox.o entry.o label.o listbox.o scrollbar.o textbox.o scale.o grid.o windows.o buttonbar.o checkboxtree.o -OBJS-DIET = $(subst .o,-DIET.o,$(OBJS)) +TARGETS = $(LIBNAME).a + +ifeq (DIETLIBC, $(L)) +TARGETS += $(LIBNAME)-DIET.a +endif +all: $(TARGETS) -libnewt.a: $(OBJS) +clean: + rm -f *.o *.a + +OBJS-DIET = $(subst .o,-DIET.o,$(OBJS)) + +$(LIBNAME).a: $(OBJS) ar -cru $@ $^ ranlib $@ -libnewt-DIET.a: $(OBJS-DIET) +$(LIBNAME)-DIET.a: $(OBJS-DIET) ar -cru $@ $^ ranlib $@ - $(OBJS): %.o: %.c - gcc $(FLAGS) $(GLIBC_INCLUDES) $(INCS) -c $< -o $@ + gcc $(CFLAGS) $(DEFS) $(INCS) $(GLIBC_INCLUDES) -c $< -o $@ $(OBJS-DIET): %-DIET.o: %.c - gcc $(FLAGS) $(DIETLIBC_INCLUDES) $(INCS) -c $< -o $@ + gcc $(CFLAGS) $(DEFS) $(INCS) $(DIETLIBC_INCLUDES) -c $< -o $@ -- cgit v1.2.1