annotate lwbasic/attic/rules.make @ 215:5330ba70836a

Fix undefined symbol error with pragma nosymbolcase Made symbol tree lookup handle case sensitivity correctly. It is not sufficient to switch which of strcmp and strcasecmp is used to do the lookups. Instead, one must use strcasecmp all the way until a match and then use additional sorting once a match is achieved, if relevant. In this case, a simple linked list of symbols that differ only in case since this is not expected to be a common case.
author William Astle <lost@l-w.ca>
date Sun, 10 Jun 2012 13:29:23 -0600
parents cca933d32298
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)