annotate lwbasic/rules.make @ 26:26aa76da75ad

Additional parsing in function/sub; emission of prolog/epilog code
author lost@l-w.ca
date Thu, 27 Jan 2011 20:44:57 -0700
parents 87590f43e76d
children bc96cd02fbf4
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
26
26aa76da75ad Additional parsing in function/sub; emission of prolog/epilog code
lost@l-w.ca
parents: 25
diff changeset
4 lwbasic_lsrcs := main.c input.c compiler.c lexer.c emit.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)