Mercurial > hg > index.cgi
annotate Makefile @ 282:3c421f24c9b8
Make <...,PCR complain on byte overflows
Richard Goedeken <Richard@fascinationsoftawre.com> reported that forcing 8
bit offsets relative to PCR would not complain if the magnitude of the
offset did not fit in 8 bits. This was the result of a missing test for the
byte overflow situation which has now been added.
author | William Astle <lost@l-w.ca> |
---|---|
date | Sat, 31 Aug 2013 11:46:00 -0600 |
parents | 1dcc0b174e3b |
children | fc76f1a0dc49 21ecf29b568e |
rev | line source |
---|---|
10
127e5b1e01c0
Removed use of asprintf() and added Makefile options for cross compiling; also a bugfix with sizeof{} in lwasm
lost@l-w.ca
parents:
9
diff
changeset
|
1 # define anything system specific here |
127e5b1e01c0
Removed use of asprintf() and added Makefile options for cross compiling; also a bugfix with sizeof{} in lwasm
lost@l-w.ca
parents:
9
diff
changeset
|
2 # |
127e5b1e01c0
Removed use of asprintf() and added Makefile options for cross compiling; also a bugfix with sizeof{} in lwasm
lost@l-w.ca
parents:
9
diff
changeset
|
3 # set these variables if needed |
127e5b1e01c0
Removed use of asprintf() and added Makefile options for cross compiling; also a bugfix with sizeof{} in lwasm
lost@l-w.ca
parents:
9
diff
changeset
|
4 # PROGSUFFIX: suffix added to binaries |
127e5b1e01c0
Removed use of asprintf() and added Makefile options for cross compiling; also a bugfix with sizeof{} in lwasm
lost@l-w.ca
parents:
9
diff
changeset
|
5 # BUILDTPREFIX: prefix added to build utilities (cc, etc.) for xcompile |
127e5b1e01c0
Removed use of asprintf() and added Makefile options for cross compiling; also a bugfix with sizeof{} in lwasm
lost@l-w.ca
parents:
9
diff
changeset
|
6 # can also set them when invoking "make" |
127e5b1e01c0
Removed use of asprintf() and added Makefile options for cross compiling; also a bugfix with sizeof{} in lwasm
lost@l-w.ca
parents:
9
diff
changeset
|
7 #PROGSUFFIX := .exe |
127e5b1e01c0
Removed use of asprintf() and added Makefile options for cross compiling; also a bugfix with sizeof{} in lwasm
lost@l-w.ca
parents:
9
diff
changeset
|
8 #BUILDTPREFIX=i586-mingw32msvc- |
0
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
9 |
275
776a076d1afa
Makefile: Allow DESTDIR for distribution package creation
Tormod Volden <debian.tormod@gmail.com>
parents:
272
diff
changeset
|
10 ifneq ($(DESTDIR),) |
776a076d1afa
Makefile: Allow DESTDIR for distribution package creation
Tormod Volden <debian.tormod@gmail.com>
parents:
272
diff
changeset
|
11 INSTALLDIR = $(DESTDIR)/usr/bin |
776a076d1afa
Makefile: Allow DESTDIR for distribution package creation
Tormod Volden <debian.tormod@gmail.com>
parents:
272
diff
changeset
|
12 else |
776a076d1afa
Makefile: Allow DESTDIR for distribution package creation
Tormod Volden <debian.tormod@gmail.com>
parents:
272
diff
changeset
|
13 INSTALLDIR ?= /usr/local/bin |
776a076d1afa
Makefile: Allow DESTDIR for distribution package creation
Tormod Volden <debian.tormod@gmail.com>
parents:
272
diff
changeset
|
14 endif |
270
35b6787a5b39
Allow make install destination to be overridden
William Astle <lost@l-w.ca>
parents:
269
diff
changeset
|
15 |
272
cfeb196251e4
Fix conditional setting of build tools variables in the makefile
William Astle <lost@l-w.ca>
parents:
271
diff
changeset
|
16 # this are probably pointless but they will make sure |
cfeb196251e4
Fix conditional setting of build tools variables in the makefile
William Astle <lost@l-w.ca>
parents:
271
diff
changeset
|
17 # the variables are set without overriding the environment |
cfeb196251e4
Fix conditional setting of build tools variables in the makefile
William Astle <lost@l-w.ca>
parents:
271
diff
changeset
|
18 # or automatic values from make itself. |
cfeb196251e4
Fix conditional setting of build tools variables in the makefile
William Astle <lost@l-w.ca>
parents:
271
diff
changeset
|
19 CC ?= cc |
cfeb196251e4
Fix conditional setting of build tools variables in the makefile
William Astle <lost@l-w.ca>
parents:
271
diff
changeset
|
20 AR ?= ar |
cfeb196251e4
Fix conditional setting of build tools variables in the makefile
William Astle <lost@l-w.ca>
parents:
271
diff
changeset
|
21 RANLIB ?= ranlib |
10
127e5b1e01c0
Removed use of asprintf() and added Makefile options for cross compiling; also a bugfix with sizeof{} in lwasm
lost@l-w.ca
parents:
9
diff
changeset
|
22 |
272
cfeb196251e4
Fix conditional setting of build tools variables in the makefile
William Astle <lost@l-w.ca>
parents:
271
diff
changeset
|
23 # Set variables for cross compiling |
cfeb196251e4
Fix conditional setting of build tools variables in the makefile
William Astle <lost@l-w.ca>
parents:
271
diff
changeset
|
24 ifneq ($(BUILDTPREFIX),) |
cfeb196251e4
Fix conditional setting of build tools variables in the makefile
William Astle <lost@l-w.ca>
parents:
271
diff
changeset
|
25 CC := $(BUILDTPREFIX)$(CC) |
cfeb196251e4
Fix conditional setting of build tools variables in the makefile
William Astle <lost@l-w.ca>
parents:
271
diff
changeset
|
26 AR := $(BUILDTPREFIX)$(AR) |
cfeb196251e4
Fix conditional setting of build tools variables in the makefile
William Astle <lost@l-w.ca>
parents:
271
diff
changeset
|
27 RANLIB := $(BUILDTPREFIX)$(RANLIB) |
cfeb196251e4
Fix conditional setting of build tools variables in the makefile
William Astle <lost@l-w.ca>
parents:
271
diff
changeset
|
28 endif |
10
127e5b1e01c0
Removed use of asprintf() and added Makefile options for cross compiling; also a bugfix with sizeof{} in lwasm
lost@l-w.ca
parents:
9
diff
changeset
|
29 |
277
1dcc0b174e3b
Bump version string to show 4.8 in preparation for release
William Astle <lost@l-w.ca>
parents:
275
diff
changeset
|
30 CPPFLAGS += -I lwlib -DPACKAGE_STRING='"lwtools 4.8"' |
0
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
31 LDFLAGS += -L$(PWD)/lwlib -llw |
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
32 |
260 | 33 CFLAGS ?= -O3 -Wall |
10
127e5b1e01c0
Removed use of asprintf() and added Makefile options for cross compiling; also a bugfix with sizeof{} in lwasm
lost@l-w.ca
parents:
9
diff
changeset
|
34 |
127e5b1e01c0
Removed use of asprintf() and added Makefile options for cross compiling; also a bugfix with sizeof{} in lwasm
lost@l-w.ca
parents:
9
diff
changeset
|
35 MAIN_TARGETS := lwasm/lwasm$(PROGSUFFIX) \ |
127e5b1e01c0
Removed use of asprintf() and added Makefile options for cross compiling; also a bugfix with sizeof{} in lwasm
lost@l-w.ca
parents:
9
diff
changeset
|
36 lwlink/lwlink$(PROGSUFFIX) \ |
127e5b1e01c0
Removed use of asprintf() and added Makefile options for cross compiling; also a bugfix with sizeof{} in lwasm
lost@l-w.ca
parents:
9
diff
changeset
|
37 lwar/lwar$(PROGSUFFIX) \ |
127e5b1e01c0
Removed use of asprintf() and added Makefile options for cross compiling; also a bugfix with sizeof{} in lwasm
lost@l-w.ca
parents:
9
diff
changeset
|
38 lwlink/lwobjdump$(PROGSUFFIX) |
0
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
39 |
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
40 .PHONY: all |
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
41 all: $(MAIN_TARGETS) |
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
42 |
189
8a84141ea6dd
Removed rules.make stuff in sub directories - it was not particularly helpful
lost@l-w.ca
parents:
188
diff
changeset
|
43 lwar_srcs := add.c extract.c list.c lwar.c main.c remove.c replace.c |
8a84141ea6dd
Removed rules.make stuff in sub directories - it was not particularly helpful
lost@l-w.ca
parents:
188
diff
changeset
|
44 lwar_srcs := $(addprefix lwar/,$(lwar_srcs)) |
0
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
45 |
189
8a84141ea6dd
Removed rules.make stuff in sub directories - it was not particularly helpful
lost@l-w.ca
parents:
188
diff
changeset
|
46 lwlib_srcs := lw_alloc.c lw_realloc.c lw_free.c lw_error.c lw_expr.c \ |
8a84141ea6dd
Removed rules.make stuff in sub directories - it was not particularly helpful
lost@l-w.ca
parents:
188
diff
changeset
|
47 lw_stack.c lw_string.c lw_stringlist.c lw_cmdline.c |
190
20ba68be2cd7
Fixed typos with conversion away from rules.make stuff
lost@l-w.ca
parents:
189
diff
changeset
|
48 lwlib_srcs := $(addprefix lwlib/,$(lwlib_srcs)) |
189
8a84141ea6dd
Removed rules.make stuff in sub directories - it was not particularly helpful
lost@l-w.ca
parents:
188
diff
changeset
|
49 |
8a84141ea6dd
Removed rules.make stuff in sub directories - it was not particularly helpful
lost@l-w.ca
parents:
188
diff
changeset
|
50 lwlink_srcs := main.c lwlink.c readfiles.c expr.c script.c link.c output.c map.c |
8a84141ea6dd
Removed rules.make stuff in sub directories - it was not particularly helpful
lost@l-w.ca
parents:
188
diff
changeset
|
51 lwobjdump_srcs := objdump.c |
8a84141ea6dd
Removed rules.make stuff in sub directories - it was not particularly helpful
lost@l-w.ca
parents:
188
diff
changeset
|
52 lwlink_srcs := $(addprefix lwlink/,$(lwlink_srcs)) |
8a84141ea6dd
Removed rules.make stuff in sub directories - it was not particularly helpful
lost@l-w.ca
parents:
188
diff
changeset
|
53 lwobjdump_srcs := $(addprefix lwlink/,$(lwobjdump_srcs)) |
0
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
54 |
189
8a84141ea6dd
Removed rules.make stuff in sub directories - it was not particularly helpful
lost@l-w.ca
parents:
188
diff
changeset
|
55 lwasm_srcs := debug.c input.c insn_bitbit.c insn_gen.c insn_indexed.c \ |
8a84141ea6dd
Removed rules.make stuff in sub directories - it was not particularly helpful
lost@l-w.ca
parents:
188
diff
changeset
|
56 insn_inh.c insn_logicmem.c insn_rel.c insn_rlist.c insn_rtor.c insn_tfm.c \ |
8a84141ea6dd
Removed rules.make stuff in sub directories - it was not particularly helpful
lost@l-w.ca
parents:
188
diff
changeset
|
57 instab.c list.c lwasm.c macro.c main.c os9.c output.c pass1.c pass2.c \ |
8a84141ea6dd
Removed rules.make stuff in sub directories - it was not particularly helpful
lost@l-w.ca
parents:
188
diff
changeset
|
58 pass3.c pass4.c pass5.c pass6.c pass7.c pragma.c pseudo.c section.c \ |
222
03f7192fcd20
Add --unicorns option for IDE integration
William Astle <lost@l-w.ca>
parents:
213
diff
changeset
|
59 struct.c symbol.c unicorns.c |
189
8a84141ea6dd
Removed rules.make stuff in sub directories - it was not particularly helpful
lost@l-w.ca
parents:
188
diff
changeset
|
60 lwasm_srcs := $(addprefix lwasm/,$(lwasm_srcs)) |
188 | 61 |
0
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
62 lwasm_objs := $(lwasm_srcs:.c=.o) |
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
63 lwlink_objs := $(lwlink_srcs:.c=.o) |
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
64 lwar_objs := $(lwar_srcs:.c=.o) |
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
65 lwlib_objs := $(lwlib_srcs:.c=.o) |
2
7317fbe024af
Clean up insane number of compiler warnings under -Wall
lost@l-w.ca
parents:
1
diff
changeset
|
66 lwobjdump_objs := $(lwobjdump_srcs:.c=.o) |
0
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
67 |
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
68 lwasm_deps := $(lwasm_srcs:.c=.d) |
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
69 lwlink_deps := $(lwlink_srcs:.c=.d) |
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
70 lwar_deps := $(lwar_srcs:.c=.d) |
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
71 lwlib_deps := $(lwlib_srcs:.c=.d) |
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
72 lwobjdump_deps := $(lwobjdump_srcs:.c=.d) |
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
73 |
269
1c70570e3d42
Remove references to lwbasic and lwcc directories from the Makefile
William Astle <lost@l-w.ca>
parents:
260
diff
changeset
|
74 .PHONY: lwlink lwasm lwar lwobjdump |
10
127e5b1e01c0
Removed use of asprintf() and added Makefile options for cross compiling; also a bugfix with sizeof{} in lwasm
lost@l-w.ca
parents:
9
diff
changeset
|
75 lwlink: lwlink/lwlink$(PROGSUFFIX) |
127e5b1e01c0
Removed use of asprintf() and added Makefile options for cross compiling; also a bugfix with sizeof{} in lwasm
lost@l-w.ca
parents:
9
diff
changeset
|
76 lwasm: lwasm/lwasm$(PROGSUFFIX) |
127e5b1e01c0
Removed use of asprintf() and added Makefile options for cross compiling; also a bugfix with sizeof{} in lwasm
lost@l-w.ca
parents:
9
diff
changeset
|
77 lwar: lwar/lwar$(PROGSUFFIX) |
127e5b1e01c0
Removed use of asprintf() and added Makefile options for cross compiling; also a bugfix with sizeof{} in lwasm
lost@l-w.ca
parents:
9
diff
changeset
|
78 lwobjdump: lwlink/lwobjdump$(PROGSUFFIX) |
22 | 79 |
189
8a84141ea6dd
Removed rules.make stuff in sub directories - it was not particularly helpful
lost@l-w.ca
parents:
188
diff
changeset
|
80 lwasm/lwasm$(PROGSUFFIX): $(lwasm_objs) lwlib |
11 | 81 @echo Linking $@ |
82 @$(CC) -o $@ $(lwasm_objs) $(LDFLAGS) | |
0
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
83 |
189
8a84141ea6dd
Removed rules.make stuff in sub directories - it was not particularly helpful
lost@l-w.ca
parents:
188
diff
changeset
|
84 lwlink/lwlink$(PROGSUFFIX): $(lwlink_objs) lwlib |
11 | 85 @echo Linking $@ |
86 @$(CC) -o $@ $(lwlink_objs) $(LDFLAGS) | |
0
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
87 |
189
8a84141ea6dd
Removed rules.make stuff in sub directories - it was not particularly helpful
lost@l-w.ca
parents:
188
diff
changeset
|
88 lwlink/lwobjdump$(PROGSUFFIX): $(lwobjdump_objs) lwlib |
11 | 89 @echo Linking $@ |
90 @$(CC) -o $@ $(lwobjdump_objs) $(LDFLAGS) | |
0
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
91 |
189
8a84141ea6dd
Removed rules.make stuff in sub directories - it was not particularly helpful
lost@l-w.ca
parents:
188
diff
changeset
|
92 lwar/lwar$(PROGSUFFIX): $(lwar_objs) lwlib |
17
4969bd6f3b7d
Fixed up glitch with Makefile causing binaries to always be considered out of date
lost@l-w.ca
parents:
16
diff
changeset
|
93 @echo Linking $@ |
11 | 94 @$(CC) -o $@ $(lwar_objs) $(LDFLAGS) |
0
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
95 |
17
4969bd6f3b7d
Fixed up glitch with Makefile causing binaries to always be considered out of date
lost@l-w.ca
parents:
16
diff
changeset
|
96 #.PHONY: lwlib |
4969bd6f3b7d
Fixed up glitch with Makefile causing binaries to always be considered out of date
lost@l-w.ca
parents:
16
diff
changeset
|
97 .INTERMEDIATE: lwlib |
0
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
98 lwlib: lwlib/liblw.a |
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
99 |
190
20ba68be2cd7
Fixed typos with conversion away from rules.make stuff
lost@l-w.ca
parents:
189
diff
changeset
|
100 lwlib/liblw.a: $(lwlib_objs) |
11 | 101 @echo Linking $@ |
102 @$(AR) rc $@ $(lwlib_objs) | |
103 @$(RANLIB) $@ | |
0
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
104 |
269
1c70570e3d42
Remove references to lwbasic and lwcc directories from the Makefile
William Astle <lost@l-w.ca>
parents:
260
diff
changeset
|
105 alldeps := $(lwasm_deps) $(lwlink_deps) $(lwar_deps) $(lwlib_deps) ($lwobjdump_deps) |
3 | 106 |
107 -include $(alldeps) | |
0
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
108 |
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
109 extra_clean := $(extra_clean) *~ */*~ |
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
110 |
11 | 111 %.o: %.c |
181
5350ce9f446f
Arranged for dependencies to be generated when building object files; no more extraneous dependency rebuilds
lost@l-w.ca
parents:
173
diff
changeset
|
112 @echo "Building dependencies for $@" |
5350ce9f446f
Arranged for dependencies to be generated when building object files; no more extraneous dependency rebuilds
lost@l-w.ca
parents:
173
diff
changeset
|
113 @$(CC) -MM $(CPPFLAGS) -o $*.d $< |
5350ce9f446f
Arranged for dependencies to be generated when building object files; no more extraneous dependency rebuilds
lost@l-w.ca
parents:
173
diff
changeset
|
114 @mv -f $*.d $*.d.tmp |
5350ce9f446f
Arranged for dependencies to be generated when building object files; no more extraneous dependency rebuilds
lost@l-w.ca
parents:
173
diff
changeset
|
115 @sed -e 's|.*:|$*.o $*.d:|' < $*.d.tmp > $*.d |
5350ce9f446f
Arranged for dependencies to be generated when building object files; no more extraneous dependency rebuilds
lost@l-w.ca
parents:
173
diff
changeset
|
116 @sed -e 's/.*://' -e 's/\\$$//' < $*.d.tmp | fmt -1 | sed -e 's/^ *//' -e 's/$$/:/' >> $*.d |
5350ce9f446f
Arranged for dependencies to be generated when building object files; no more extraneous dependency rebuilds
lost@l-w.ca
parents:
173
diff
changeset
|
117 @rm -f $*.d.tmp |
11 | 118 @echo Building $@ |
119 @$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ -c $< | |
120 | |
121 | |
0
2c24602be78f
Initial import from lwtools 3.0.1 version, with new hand built build system and file reorganization
lost@l-w.ca
parents:
diff
changeset
|
122 .PHONY: clean |
22 | 123 clean: $(cleantargs) |
11 | 124 @echo "Cleaning up" |
269
1c70570e3d42
Remove references to lwbasic and lwcc directories from the Makefile
William Astle <lost@l-w.ca>
parents:
260
diff
changeset
|
125 @rm -f lwlib/liblw.a lwasm/lwasm$(PROGSUFFIX) lwlink/lwlink$(PROGSUFFIX) lwlink/lwobjdump$(PROGSUFFIX) lwar/lwar$(PROGSUFFIX) |
1c70570e3d42
Remove references to lwbasic and lwcc directories from the Makefile
William Astle <lost@l-w.ca>
parents:
260
diff
changeset
|
126 @rm -f $(lwasm_objs) $(lwlink_objs) $(lwar_objs) $(lwlib_objs) $(lwobjdump_objs) |
11 | 127 @rm -f $(extra_clean) |
20
f4df3bd4b85f
Moved removal of dep files to realclean and properly remove any .exe files
lost@l-w.ca
parents:
17
diff
changeset
|
128 @rm -f */*.exe |
2
7317fbe024af
Clean up insane number of compiler warnings under -Wall
lost@l-w.ca
parents:
1
diff
changeset
|
129 |
16
2f98cf1558e1
Added building of manual from docbook source to Makefile
lost@l-w.ca
parents:
11
diff
changeset
|
130 .PHONY: realclean |
22 | 131 realclean: clean $(realcleantargs) |
16
2f98cf1558e1
Added building of manual from docbook source to Makefile
lost@l-w.ca
parents:
11
diff
changeset
|
132 @echo "Cleaning up even more" |
269
1c70570e3d42
Remove references to lwbasic and lwcc directories from the Makefile
William Astle <lost@l-w.ca>
parents:
260
diff
changeset
|
133 @rm -f $(lwasm_deps) $(lwlink_deps) $(lwar_deps) $(lwlib_deps) $(lwobjdump_deps) |
16
2f98cf1558e1
Added building of manual from docbook source to Makefile
lost@l-w.ca
parents:
11
diff
changeset
|
134 @rm -f docs/manual/*.html docs/manual/*.pdf |
2f98cf1558e1
Added building of manual from docbook source to Makefile
lost@l-w.ca
parents:
11
diff
changeset
|
135 |
2
7317fbe024af
Clean up insane number of compiler warnings under -Wall
lost@l-w.ca
parents:
1
diff
changeset
|
136 print-%: |
7317fbe024af
Clean up insane number of compiler warnings under -Wall
lost@l-w.ca
parents:
1
diff
changeset
|
137 @echo $* = $($*) |
3 | 138 |
139 .PHONY: install | |
140 install: | |
275
776a076d1afa
Makefile: Allow DESTDIR for distribution package creation
Tormod Volden <debian.tormod@gmail.com>
parents:
272
diff
changeset
|
141 install -d $(INSTALLDIR) |
776a076d1afa
Makefile: Allow DESTDIR for distribution package creation
Tormod Volden <debian.tormod@gmail.com>
parents:
272
diff
changeset
|
142 install $(MAIN_TARGETS) $(INSTALLDIR) |
173 | 143 |
144 .PHONY: test | |
145 test: all test/runtests | |
146 @test/runtests | |
189
8a84141ea6dd
Removed rules.make stuff in sub directories - it was not particularly helpful
lost@l-w.ca
parents:
188
diff
changeset
|
147 |
8a84141ea6dd
Removed rules.make stuff in sub directories - it was not particularly helpful
lost@l-w.ca
parents:
188
diff
changeset
|
148 .PHONY: manual |
8a84141ea6dd
Removed rules.make stuff in sub directories - it was not particularly helpful
lost@l-w.ca
parents:
188
diff
changeset
|
149 manual: manual-html manual-htmlm manual-pdf |
8a84141ea6dd
Removed rules.make stuff in sub directories - it was not particularly helpful
lost@l-w.ca
parents:
188
diff
changeset
|
150 |
8a84141ea6dd
Removed rules.make stuff in sub directories - it was not particularly helpful
lost@l-w.ca
parents:
188
diff
changeset
|
151 .PHONY: manual-html |
8a84141ea6dd
Removed rules.make stuff in sub directories - it was not particularly helpful
lost@l-w.ca
parents:
188
diff
changeset
|
152 manual-html: docs/manual/manual.html |
8a84141ea6dd
Removed rules.make stuff in sub directories - it was not particularly helpful
lost@l-w.ca
parents:
188
diff
changeset
|
153 |
8a84141ea6dd
Removed rules.make stuff in sub directories - it was not particularly helpful
lost@l-w.ca
parents:
188
diff
changeset
|
154 .PHONY: manual-htmlm |
8a84141ea6dd
Removed rules.make stuff in sub directories - it was not particularly helpful
lost@l-w.ca
parents:
188
diff
changeset
|
155 manual-htmlm: docs/manual/index.html |
8a84141ea6dd
Removed rules.make stuff in sub directories - it was not particularly helpful
lost@l-w.ca
parents:
188
diff
changeset
|
156 |
8a84141ea6dd
Removed rules.make stuff in sub directories - it was not particularly helpful
lost@l-w.ca
parents:
188
diff
changeset
|
157 .PHONY: manual-pdf |
8a84141ea6dd
Removed rules.make stuff in sub directories - it was not particularly helpful
lost@l-w.ca
parents:
188
diff
changeset
|
158 manual-pdf: docs/manual/manual.pdf |
8a84141ea6dd
Removed rules.make stuff in sub directories - it was not particularly helpful
lost@l-w.ca
parents:
188
diff
changeset
|
159 |
8a84141ea6dd
Removed rules.make stuff in sub directories - it was not particularly helpful
lost@l-w.ca
parents:
188
diff
changeset
|
160 docs/manual/manual.html: docs/manual.docbook.sgml |
8a84141ea6dd
Removed rules.make stuff in sub directories - it was not particularly helpful
lost@l-w.ca
parents:
188
diff
changeset
|
161 docbook2html -o docs -u docs/manual.docbook.sgml && mv docs/manual.docbook.html docs/manual/manual.html |
8a84141ea6dd
Removed rules.make stuff in sub directories - it was not particularly helpful
lost@l-w.ca
parents:
188
diff
changeset
|
162 |
8a84141ea6dd
Removed rules.make stuff in sub directories - it was not particularly helpful
lost@l-w.ca
parents:
188
diff
changeset
|
163 docs/manual/index.html: docs/manual.docbook.sgml |
8a84141ea6dd
Removed rules.make stuff in sub directories - it was not particularly helpful
lost@l-w.ca
parents:
188
diff
changeset
|
164 docbook2html -o docs/manual docsmanual.docbook.sgml |
8a84141ea6dd
Removed rules.make stuff in sub directories - it was not particularly helpful
lost@l-w.ca
parents:
188
diff
changeset
|
165 |
8a84141ea6dd
Removed rules.make stuff in sub directories - it was not particularly helpful
lost@l-w.ca
parents:
188
diff
changeset
|
166 docs/manual/manual.pdf: docs/manual.docbook.sgml |
8a84141ea6dd
Removed rules.make stuff in sub directories - it was not particularly helpful
lost@l-w.ca
parents:
188
diff
changeset
|
167 docbook2pdf -o docs -u docsmanual.docbook.sgml && mv docs/manual.docbook.pdf docs/manual/manual.pdf && rm -f docs/manual.docbook.html |
8a84141ea6dd
Removed rules.make stuff in sub directories - it was not particularly helpful
lost@l-w.ca
parents:
188
diff
changeset
|
168 |