More functional Makefile.
[Jack-Compiler.git] / Makefile
blob9c454a51ca06221f0326e8651cdc3ad82429b3c0
1 CC = gcc
3 OBJS = jack.o error.o token.o parse.o test.o
4 PROG = jack
5 INSTALLDIR = /usr/local/bin
7 jack: CFLAGS = -O3
8 debug: CFLAGS = -Wall -pedantic -std=c99 -ansi -DDEBUG -g -O0 -ggdb3 -Wextra -Wno-missing-field-initializers
9 small: CFLAGS = -Os
11 jack: $(OBJS)
12 $(CC) $(CFLAGS) $(LIBS) -o $(PROG) $(OBJS)
14 debug: $(OBJS)
15 $(CC) $(CFLAGS) $(LIBS) -o $(PROG) $(OBJS)
16 @ touch debug
18 small: $(OBJS)
19 $(CC) $(CFLAGS) $(LIBS) -o $(PROG) $(OBJS)
20 @ touch small
22 clean:
23 rm -f debug small $(PROG) $(OBJS)
25 install:
26 cp $(PROG) $(INSTALLDIR)
28 clobber:
29 cd $(INSTALLDIR); rm -f $(PROG)
31 all: jack install