comparison Makefile @ 2:7317fbe024af

Clean up insane number of compiler warnings under -Wall
author lost@l-w.ca
date Thu, 20 Jan 2011 22:39:46 -0700
parents 96c4dc89016e
children d4eb3c328a47
comparison
equal deleted inserted replaced
1:96c4dc89016e 2:7317fbe024af
1 CPPFLAGS += -I lwlib -DPACKAGE_STRING='"lwtools 4.0-pre"' -DPACKAGE_BUGREPORT='"lost@l-w.ca"' 1 CPPFLAGS += -I lwlib -D_GNU_SOURCE -DPACKAGE_STRING='"lwtools 4.0-pre"' -DPACKAGE_BUGREPORT='"lost@l-w.ca"'
2 2
3 LDFLAGS += -L$(PWD)/lwlib -llw 3 LDFLAGS += -L$(PWD)/lwlib -llw
4 4
5 MAIN_TARGETS := lwasm/lwasm lwlink/lwlink lwar/lwar 5 MAIN_TARGETS := lwasm/lwasm lwlink/lwlink lwar/lwar lwlink/lwobjdump
6 6
7 .PHONY: all 7 .PHONY: all
8 all: $(MAIN_TARGETS) 8 all: $(MAIN_TARGETS)
9 9
10 subdirs := lwasm lwlink lwar lwlib 10 subdirs := lwasm lwlink lwar lwlib
13 13
14 lwasm_objs := $(lwasm_srcs:.c=.o) 14 lwasm_objs := $(lwasm_srcs:.c=.o)
15 lwlink_objs := $(lwlink_srcs:.c=.o) 15 lwlink_objs := $(lwlink_srcs:.c=.o)
16 lwar_objs := $(lwar_srcs:.c=.o) 16 lwar_objs := $(lwar_srcs:.c=.o)
17 lwlib_objs := $(lwlib_srcs:.c=.o) 17 lwlib_objs := $(lwlib_srcs:.c=.o)
18 lwobjdump_objs := $(lwobjdump_srcs:.c=.o)
18 19
19 lwasm_deps := $(lwasm_srcs:.c=.d) 20 lwasm_deps := $(lwasm_srcs:.c=.d)
20 lwlink_deps := $(lwlink_srcs:.c=.d) 21 lwlink_deps := $(lwlink_srcs:.c=.d)
21 lwar_deps := $(lwar_srcs:.c=.d) 22 lwar_deps := $(lwar_srcs:.c=.d)
22 lwlib_deps := $(lwlib_srcs:.c=.d) 23 lwlib_deps := $(lwlib_srcs:.c=.d)
63 clean: 64 clean:
64 rm -f $(lwasm_deps) $(lwlink_deps) $(lwar_deps) $(lwlib_deps) $(lwobjdump_deps) 65 rm -f $(lwasm_deps) $(lwlink_deps) $(lwar_deps) $(lwlib_deps) $(lwobjdump_deps)
65 rm -f lwlib/liblw.a lwasm/lwasm lwlink/lwlink lwlink/lwobjdump lwar/lwar 66 rm -f lwlib/liblw.a lwasm/lwasm lwlink/lwlink lwlink/lwobjdump lwar/lwar
66 rm -f $(lwasm_objs) $(lwlink_objs) $(lwar_objs) $(lwlib_objs) $(lwobjdump_objs) 67 rm -f $(lwasm_objs) $(lwlink_objs) $(lwar_objs) $(lwlib_objs) $(lwobjdump_objs)
67 rm -f $(extra_clean) 68 rm -f $(extra_clean)
69
70 print-%:
71 @echo $* = $($*)
68 72