original C prototype
[maximus:kjhf.git] / prototype / Makefile
1 CC = gcc
2 CFLAGS = -std=c99 -Wall -pedantic -O3 -ggdb
3 LIBS = 
4 OBJS = fbitstream.o hyperspace.o machine.o main.o parser.o
5
6 all: hyperfuck
7
8 clean:
9         -rm -f $(OBJS)
10
11 test: fbitstream-test
12
13 .SUFFIXES:
14 .PHONY: all clean test
15
16 # link program
17 hyperfuck: $(OBJS)
18         $(CC) $(CFLAGS) -o hyperfuck $(OBJS) $(LIBS)
19
20 fbitstream-test: fbitstream-test.o fbitstream.o
21         $(CC) $(CFLAGS) -s -o fbitstream-test fbitstream-test.o fbitstream.o
22
23 # dependencies
24 fbitstream.o: fbitstream.c fbitstream.h bitstream.h
25 fbitstream-test.o: fbitstream-test.c fbitstream.h bitstream.h
26 hyperspace.o: hyperspace.c hyperspace.h bitstream.h
27 machine.o: machine.c machine.h bitstream.h fbitstream.h hyperspace.h parser.h
28 parser.o: parser.c parser.h
29 main.o: main.c machine.h hyperspace.h bitstream.h
30
31 # C source to object file
32 %.o: %.c
33         $(CC) $(CFLAGS) -o $@ -c $<
34