comparison Makefile @ 189:8a84141ea6dd

Removed rules.make stuff in sub directories - it was not particularly helpful
author lost@l-w.ca
date Wed, 11 Jan 2012 20:25:29 -0700
parents b6685a7ec2bd
children 20ba68be2cd7
comparison
equal deleted inserted replaced
188:b6685a7ec2bd 189:8a84141ea6dd
27 lwlink/lwobjdump$(PROGSUFFIX) 27 lwlink/lwobjdump$(PROGSUFFIX)
28 28
29 .PHONY: all 29 .PHONY: all
30 all: $(MAIN_TARGETS) 30 all: $(MAIN_TARGETS)
31 31
32 subdirs := lwasm lwlink lwar lwlib lwbasic docs 32 lwar_srcs := add.c extract.c list.c lwar.c main.c remove.c replace.c
33 lwar_srcs := $(addprefix lwar/,$(lwar_srcs))
33 34
34 -include $(subdirs:=/rules.make) 35 lwlib_srcs := lw_alloc.c lw_realloc.c lw_free.c lw_error.c lw_expr.c \
36 lw_stack.c lw_string.c lw_stringlist.c lw_cmdline.c
37 lwlib_srcs := $(addprefix lwlib/,$(lwlib_srcs_local))
38
39 lwlink_srcs := main.c lwlink.c readfiles.c expr.c script.c link.c output.c map.c
40 lwobjdump_srcs := objdump.c
41 lwlink_srcs := $(addprefix lwlink/,$(lwlink_srcs))
42 lwobjdump_srcs := $(addprefix lwlink/,$(lwobjdump_srcs))
35 43
36 lwcc_srcs := lwcc.c 44 lwcc_srcs := lwcc.c
37
38 lwcc_srcs := $(addprefix lwcc/,$(lwcc_srcs)) 45 lwcc_srcs := $(addprefix lwcc/,$(lwcc_srcs))
39 46
47 lwasm_srcs := debug.c input.c insn_bitbit.c insn_gen.c insn_indexed.c \
48 insn_inh.c insn_logicmem.c insn_rel.c insn_rlist.c insn_rtor.c insn_tfm.c \
49 instab.c list.c lwasm.c macro.c main.c os9.c output.c pass1.c pass2.c \
50 pass3.c pass4.c pass5.c pass6.c pass7.c pragma.c pseudo.c section.c \
51 struct.c symbol.c
52 lwasm_srcs := $(addprefix lwasm/,$(lwasm_srcs))
40 53
41 lwasm_objs := $(lwasm_srcs:.c=.o) 54 lwasm_objs := $(lwasm_srcs:.c=.o)
42 lwlink_objs := $(lwlink_srcs:.c=.o) 55 lwlink_objs := $(lwlink_srcs:.c=.o)
43 lwar_objs := $(lwar_srcs:.c=.o) 56 lwar_objs := $(lwar_srcs:.c=.o)
44 lwlib_objs := $(lwlib_srcs:.c=.o) 57 lwlib_objs := $(lwlib_srcs:.c=.o)
60 lwcc: lwcc/lwcc$(PROGSUFFIX) 73 lwcc: lwcc/lwcc$(PROGSUFFIX)
61 74
62 .PHONY: lwbasic 75 .PHONY: lwbasic
63 lwbasic: lwbasic/lwbasic$(PROGSUFFIX) 76 lwbasic: lwbasic/lwbasic$(PROGSUFFIX)
64 77
65 lwasm/lwasm$(PROGSUFFIX): $(lwasm_objs) lwlib lwasm/rules.make 78 lwasm/lwasm$(PROGSUFFIX): $(lwasm_objs) lwlib
66 @echo Linking $@ 79 @echo Linking $@
67 @$(CC) -o $@ $(lwasm_objs) $(LDFLAGS) 80 @$(CC) -o $@ $(lwasm_objs) $(LDFLAGS)
68 81
69 lwlink/lwlink$(PROGSUFFIX): $(lwlink_objs) lwlib lwlink/rules.make 82 lwlink/lwlink$(PROGSUFFIX): $(lwlink_objs) lwlib
70 @echo Linking $@ 83 @echo Linking $@
71 @$(CC) -o $@ $(lwlink_objs) $(LDFLAGS) 84 @$(CC) -o $@ $(lwlink_objs) $(LDFLAGS)
72 85
73 lwlink/lwobjdump$(PROGSUFFIX): $(lwobjdump_objs) lwlib lwlink/rules.make 86 lwlink/lwobjdump$(PROGSUFFIX): $(lwobjdump_objs) lwlib
74 @echo Linking $@ 87 @echo Linking $@
75 @$(CC) -o $@ $(lwobjdump_objs) $(LDFLAGS) 88 @$(CC) -o $@ $(lwobjdump_objs) $(LDFLAGS)
76 89
77 lwar/lwar$(PROGSUFFIX): $(lwar_objs) lwlib lwar/rules.make 90 lwar/lwar$(PROGSUFFIX): $(lwar_objs) lwlib
78 @echo Linking $@ 91 @echo Linking $@
79 @$(CC) -o $@ $(lwar_objs) $(LDFLAGS) 92 @$(CC) -o $@ $(lwar_objs) $(LDFLAGS)
80 93
81 lwcc/lwcc$(PROGSUFFIX): $(lwcc_objs) lwlib 94 lwcc/lwcc$(PROGSUFFIX): $(lwcc_objs) lwlib
82 @echo Linking $@ 95 @echo Linking $@
130 cp $(MAIN_TARGETS) /usr/local/bin/ 143 cp $(MAIN_TARGETS) /usr/local/bin/
131 144
132 .PHONY: test 145 .PHONY: test
133 test: all test/runtests 146 test: all test/runtests
134 @test/runtests 147 @test/runtests
135 148
149 .PHONY: manual
150 manual: manual-html manual-htmlm manual-pdf
151
152 .PHONY: manual-html
153 manual-html: docs/manual/manual.html
154
155 .PHONY: manual-htmlm
156 manual-htmlm: docs/manual/index.html
157
158 .PHONY: manual-pdf
159 manual-pdf: docs/manual/manual.pdf
160
161 docs/manual/manual.html: docs/manual.docbook.sgml
162 docbook2html -o docs -u docs/manual.docbook.sgml && mv docs/manual.docbook.html docs/manual/manual.html
163
164 docs/manual/index.html: docs/manual.docbook.sgml
165 docbook2html -o docs/manual docsmanual.docbook.sgml
166
167 docs/manual/manual.pdf: docs/manual.docbook.sgml
168 docbook2pdf -o docs -u docsmanual.docbook.sgml && mv docs/manual.docbook.pdf docs/manual/manual.pdf && rm -f docs/manual.docbook.html
169