Improve "emit_move()" handling.
[smatch.git] / Makefile
blob2997809d09b1f23d5e71fba212826629c65e4299
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 linearize.h bitmap.h
11 LIB_OBJS= target.o parse.o tokenize.o pre-process.o symbol.o lib.o scope.o \
12 expression.o show-parse.o evaluate.o expand.o inline.o linearize.o
14 LIB_FILE= sparse.a
15 LIBS=$(LIB_FILE)
17 all: $(PROGRAMS)
20 # Install the 'check' binary as 'sparse', just to confuse people.
22 # "The better to keep you on your toes, my dear".
24 install: check
25 if test $< -nt $(PREFIX)/bin/sparse ; then install -sv $< $(PREFIX)/bin/sparse ; fi
27 test-lexing: test-lexing.o $(LIB_FILE)
28 gcc $(LDFLAGS) -o $@ $< $(LIBS)
30 test-parsing: test-parsing.o $(LIB_FILE)
31 gcc $(LDFLAGS) -o $@ $< $(LIBS)
33 test-linearize: test-linearize.o $(LIB_FILE)
34 gcc $(LDFLAGS) -o $@ $< $(LIBS)
36 compile: compile.o compile-i386.o $(LIB_FILE)
37 gcc $(LDFLAGS) -o $@ $< compile-i386.o $(LIBS)
39 obfuscate: obfuscate.o $(LIB_FILE)
40 gcc $(LDFLAGS) -o $@ $< $(LIBS)
42 check: check.o $(LIB_FILE)
43 gcc $(LDFLAGS) -o $@ $< $(LIBS)
45 $(LIB_FILE): $(LIB_OBJS)
46 $(AR) rcs $(LIB_FILE) $(LIB_OBJS)
48 evaluate.o: $(LIB_H)
49 expression.o: $(LIB_H)
50 lib.o: $(LIB_H)
51 parse.o: $(LIB_H)
52 pre-process.o: $(LIB_H) pre-process.h
53 scope.o: $(LIB_H)
54 show-parse.o: $(LIB_H)
55 symbol.o: $(LIB_H)
56 expand.o: $(LIB_H)
57 linearize.o: $(LIB_H)
58 test-lexing.o: $(LIB_H)
59 test-parsing.o: $(LIB_H)
60 test-linearize.o: $(LIB_H)
61 compile.o: $(LIB_H)
62 compile-i386.o: $(LIB_H)
63 tokenize.o: $(LIB_H)
65 pre-process.h:
66 echo "#define GCC_INTERNAL_INCLUDE \"`$(CC) -print-file-name=include`\"" > pre-process.h
68 clean:
69 rm -f *.[oasi] core core.[0-9]* $(PROGRAMS) pre-process.h