[PATCH] evaluate_sign() typo
[smatch.git] / Makefile
blob083a2dcc7c15f43fece2db1612171d47af721af7
1 CC=gcc
2 CFLAGS=-O -g -Wall
3 LDFLAGS=-g
4 AR=ar
6 PREFIX=$(HOME)
7 PROGRAMS=test-lexing test-parsing obfuscate check compile test-linearize
9 LIB_H= token.h parse.h lib.h symbol.h scope.h expression.h target.h \
10 linearize.h bitmap.h ident-list.h
12 LIB_OBJS= target.o parse.o tokenize.o pre-process.o symbol.o lib.o scope.o \
13 expression.o show-parse.o evaluate.o expand.o inline.o linearize.o
15 LIB_FILE= sparse.a
16 LIBS=$(LIB_FILE)
18 all: $(PROGRAMS)
21 # Install the 'check' binary as 'sparse', just to confuse people.
23 # "The better to keep you on your toes, my dear".
25 install: check
26 if test $< -nt $(PREFIX)/bin/sparse ; then install -v $< $(PREFIX)/bin/sparse ; fi
28 test-lexing: test-lexing.o $(LIB_FILE)
29 gcc $(LDFLAGS) -o $@ $< $(LIBS)
31 test-parsing: test-parsing.o $(LIB_FILE)
32 gcc $(LDFLAGS) -o $@ $< $(LIBS)
34 test-linearize: test-linearize.o $(LIB_FILE)
35 gcc $(LDFLAGS) -o $@ $< $(LIBS)
37 compile: compile.o compile-i386.o $(LIB_FILE)
38 gcc $(LDFLAGS) -o $@ $< compile-i386.o $(LIBS)
40 obfuscate: obfuscate.o $(LIB_FILE)
41 gcc $(LDFLAGS) -o $@ $< $(LIBS)
43 check: check.o $(LIB_FILE)
44 gcc $(LDFLAGS) -o $@ $< $(LIBS)
46 $(LIB_FILE): $(LIB_OBJS)
47 $(AR) rcs $(LIB_FILE) $(LIB_OBJS)
49 evaluate.o: $(LIB_H)
50 expression.o: $(LIB_H)
51 lib.o: $(LIB_H)
52 parse.o: $(LIB_H)
53 pre-process.o: $(LIB_H) pre-process.h
54 scope.o: $(LIB_H)
55 show-parse.o: $(LIB_H)
56 symbol.o: $(LIB_H)
57 expand.o: $(LIB_H)
58 linearize.o: $(LIB_H)
59 inline.o: $(LIB_H)
60 target.o: $(LIB_H)
61 test-lexing.o: $(LIB_H)
62 test-parsing.o: $(LIB_H)
63 test-linearize.o: $(LIB_H)
64 compile.o: $(LIB_H) compile.h
65 compile-i386.o: $(LIB_H) compile.h
66 tokenize.o: $(LIB_H)
67 check.o: $(LIB_H)
68 obfuscate.o: $(LIB_H)
70 pre-process.h:
71 echo "#define GCC_INTERNAL_INCLUDE \"`$(CC) -print-file-name=include`\"" > pre-process.h
73 clean:
74 rm -f *.[oasi] core core.[0-9]* $(PROGRAMS) pre-process.h