comparison Makefile @ 22:7c35fa8dbc91

Added initial framework for lwbasic
author lost@l-w.ca
date Sat, 22 Jan 2011 21:01:03 -0700
parents f4df3bd4b85f
children 87590f43e76d
comparison
equal deleted inserted replaced
21:ac311e7ffed6 22:7c35fa8dbc91
26 lwlink/lwobjdump$(PROGSUFFIX) 26 lwlink/lwobjdump$(PROGSUFFIX)
27 27
28 .PHONY: all 28 .PHONY: all
29 all: $(MAIN_TARGETS) 29 all: $(MAIN_TARGETS)
30 30
31 subdirs := lwasm lwlink lwar lwlib docs 31 subdirs := lwasm lwlink lwar lwlib lwbasic docs
32 32
33 -include $(subdirs:=/rules.make) 33 -include $(subdirs:=/rules.make)
34 34
35 lwasm_objs := $(lwasm_srcs:.c=.o) 35 lwasm_objs := $(lwasm_srcs:.c=.o)
36 lwlink_objs := $(lwlink_srcs:.c=.o) 36 lwlink_objs := $(lwlink_srcs:.c=.o)
47 .PHONY: lwlink lwasm lwar lwobjdump 47 .PHONY: lwlink lwasm lwar lwobjdump
48 lwlink: lwlink/lwlink$(PROGSUFFIX) 48 lwlink: lwlink/lwlink$(PROGSUFFIX)
49 lwasm: lwasm/lwasm$(PROGSUFFIX) 49 lwasm: lwasm/lwasm$(PROGSUFFIX)
50 lwar: lwar/lwar$(PROGSUFFIX) 50 lwar: lwar/lwar$(PROGSUFFIX)
51 lwobjdump: lwlink/lwobjdump$(PROGSUFFIX) 51 lwobjdump: lwlink/lwobjdump$(PROGSUFFIX)
52
53 .PHONY: lwbasic
54 lwbasic: lwbasic/lwbasic$(PROGSUFFIX)
52 55
53 lwasm/lwasm$(PROGSUFFIX): $(lwasm_objs) lwlib lwasm/rules.make 56 lwasm/lwasm$(PROGSUFFIX): $(lwasm_objs) lwlib lwasm/rules.make
54 @echo Linking $@ 57 @echo Linking $@
55 @$(CC) -o $@ $(lwasm_objs) $(LDFLAGS) 58 @$(CC) -o $@ $(lwasm_objs) $(LDFLAGS)
56 59
96 @echo Building $@ 99 @echo Building $@
97 @$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ -c $< 100 @$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ -c $<
98 101
99 102
100 .PHONY: clean 103 .PHONY: clean
101 clean: 104 clean: $(cleantargs)
102 @echo "Cleaning up" 105 @echo "Cleaning up"
103 @rm -f lwlib/liblw.a lwasm/lwasm$(PROGSUFFIX) lwlink/lwlink$(PROGSUFFIX) lwlink/lwobjdump$(PROGSUFFIX) lwar/lwar$(PROGSUFFIX) 106 @rm -f lwlib/liblw.a lwasm/lwasm$(PROGSUFFIX) lwlink/lwlink$(PROGSUFFIX) lwlink/lwobjdump$(PROGSUFFIX) lwar/lwar$(PROGSUFFIX)
104 @rm -f $(lwasm_objs) $(lwlink_objs) $(lwar_objs) $(lwlib_objs) $(lwobjdump_objs) 107 @rm -f $(lwasm_objs) $(lwlink_objs) $(lwar_objs) $(lwlib_objs) $(lwobjdump_objs)
105 @rm -f $(extra_clean) 108 @rm -f $(extra_clean)
106 @rm -f */*.exe 109 @rm -f */*.exe
107 110
108 .PHONY: realclean 111 .PHONY: realclean
109 realclean: clean 112 realclean: clean $(realcleantargs)
110 @echo "Cleaning up even more" 113 @echo "Cleaning up even more"
111 @rm -f $(lwasm_deps) $(lwlink_deps) $(lwar_deps) $(lwlib_deps) $(lwobjdump_deps) 114 @rm -f $(lwasm_deps) $(lwlink_deps) $(lwar_deps) $(lwlib_deps) $(lwobjdump_deps)
112 @rm -f docs/manual/*.html docs/manual/*.pdf 115 @rm -f docs/manual/*.html docs/manual/*.pdf
113 116
114 print-%: 117 print-%: