annotate lwbasic/rules.make @ 161:409295d09a2e

Add _constants to the list of sections that get the constant flag by default
author lost@l-w.ca
date Sun, 28 Aug 2011 15:04:35 -0600
parents bcd532a90e53
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
22
7c35fa8dbc91 Added initial framework for lwbasic
lost@l-w.ca
parents:
diff changeset
1 dirname := $(dir $(lastword $(MAKEFILE_LIST)))
7c35fa8dbc91 Added initial framework for lwbasic
lost@l-w.ca
parents:
diff changeset
2 lwbasic_dir := $(dirname)
7c35fa8dbc91 Added initial framework for lwbasic
lost@l-w.ca
parents:
diff changeset
3
30
bcd532a90e53 Renamed "compiler" to "parser" for more consistent terminology
lost@l-w.ca
parents: 29
diff changeset
4 lwbasic_lsrcs := main.c input.c parser.c lexer.c emit.c symtab.c
22
7c35fa8dbc91 Added initial framework for lwbasic
lost@l-w.ca
parents:
diff changeset
5
7c35fa8dbc91 Added initial framework for lwbasic
lost@l-w.ca
parents:
diff changeset
6 lwbasic_srcs := $(addprefix $(dirname),$(lwbasic_lsrcs))
7c35fa8dbc91 Added initial framework for lwbasic
lost@l-w.ca
parents:
diff changeset
7 lwbasic_objs := $(lwbasic_srcs:.c=.o)
7c35fa8dbc91 Added initial framework for lwbasic
lost@l-w.ca
parents:
diff changeset
8 lwbasic_deps := $(lwbasic_srcs:.c=.d)
7c35fa8dbc91 Added initial framework for lwbasic
lost@l-w.ca
parents:
diff changeset
9
7c35fa8dbc91 Added initial framework for lwbasic
lost@l-w.ca
parents:
diff changeset
10
7c35fa8dbc91 Added initial framework for lwbasic
lost@l-w.ca
parents:
diff changeset
11
7c35fa8dbc91 Added initial framework for lwbasic
lost@l-w.ca
parents:
diff changeset
12 $(lwbasic_dir)lwbasic$(PROGSUFFIX): $(lwbasic_objs) lwlib $(lwbasic_dir)rules.make
7c35fa8dbc91 Added initial framework for lwbasic
lost@l-w.ca
parents:
diff changeset
13 @echo "Linking $@"
7c35fa8dbc91 Added initial framework for lwbasic
lost@l-w.ca
parents:
diff changeset
14 @$(CC) -o $@ $(lwbasic_objs) $(LDFLAGS)
7c35fa8dbc91 Added initial framework for lwbasic
lost@l-w.ca
parents:
diff changeset
15
7c35fa8dbc91 Added initial framework for lwbasic
lost@l-w.ca
parents:
diff changeset
16 cleantargs := $(cleantargs) lwbasicclean
7c35fa8dbc91 Added initial framework for lwbasic
lost@l-w.ca
parents:
diff changeset
17 realcleantargs := $(realcleantargs) lwbasicrealclean
7c35fa8dbc91 Added initial framework for lwbasic
lost@l-w.ca
parents:
diff changeset
18
7c35fa8dbc91 Added initial framework for lwbasic
lost@l-w.ca
parents:
diff changeset
19 .PHONY: lwbasicclean lwbasicrealclean
7c35fa8dbc91 Added initial framework for lwbasic
lost@l-w.ca
parents:
diff changeset
20 lwbasicrealclean:
7c35fa8dbc91 Added initial framework for lwbasic
lost@l-w.ca
parents:
diff changeset
21 @echo "Really cleaning up lwbasic"
7c35fa8dbc91 Added initial framework for lwbasic
lost@l-w.ca
parents:
diff changeset
22 @cd $(lwbasic_dir) && rm -f *.d
7c35fa8dbc91 Added initial framework for lwbasic
lost@l-w.ca
parents:
diff changeset
23
7c35fa8dbc91 Added initial framework for lwbasic
lost@l-w.ca
parents:
diff changeset
24 lwbasicclean:
7c35fa8dbc91 Added initial framework for lwbasic
lost@l-w.ca
parents:
diff changeset
25 @echo "Cleaning up lwbasic"
7c35fa8dbc91 Added initial framework for lwbasic
lost@l-w.ca
parents:
diff changeset
26 @cd $(lwbasic_dir) && rm -f *.o *.exe lwbasic
7c35fa8dbc91 Added initial framework for lwbasic
lost@l-w.ca
parents:
diff changeset
27
7c35fa8dbc91 Added initial framework for lwbasic
lost@l-w.ca
parents:
diff changeset
28 -include $(lwbasic_deps)