annotate lwbasic/rules.make @ 29:bc96cd02fbf4

Added basic symbol table structure
author lost@l-w.ca
date Fri, 28 Jan 2011 22:35:04 -0700
parents 26aa76da75ad
children bcd532a90e53
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
29
bc96cd02fbf4 Added basic symbol table structure
lost@l-w.ca
parents: 26
diff changeset
4 lwbasic_lsrcs := main.c input.c compiler.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)