summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/newt/Makefile
diff options
context:
space:
mode:
authorMatthias Badaire <mbadaire@mandriva.com>2001-05-30 14:31:23 +0000
committerMatthias Badaire <mbadaire@mandriva.com>2001-05-30 14:31:23 +0000
commit0879c2dadfe9f6998bdcddf837918ed8617d17b4 (patch)
tree29d89b91ab9935e390efcf1739a7867b8ea2d8c3 /mdk-stage1/newt/Makefile
parentd8b95b8592b512c3bc036cb2df9745e39104490d (diff)
downloaddrakx-0879c2dadfe9f6998bdcddf837918ed8617d17b4.tar
drakx-0879c2dadfe9f6998bdcddf837918ed8617d17b4.tar.gz
drakx-0879c2dadfe9f6998bdcddf837918ed8617d17b4.tar.bz2
drakx-0879c2dadfe9f6998bdcddf837918ed8617d17b4.tar.xz
drakx-0879c2dadfe9f6998bdcddf837918ed8617d17b4.zip
- allow build on ia64
- have CFLAGS centralized in Makefile.common (should help ports such as alpha) - better looking sub makefiles
Diffstat (limited to 'mdk-stage1/newt/Makefile')
-rw-r--r--mdk-stage1/newt/Makefile29
1 files changed, 18 insertions, 11 deletions
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 $@