summaryrefslogtreecommitdiff
path: root/Makefile
blob: c05ff2d1d4a438ecd58be89595ceb96fd6bbbd35 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
CC := gcc

CFLAGS = -Wall -Os -std=c99 -pedantic
MACROS = -D__$(shell uname -m)__ -DAS=\"$(shell which as)\" -DLD=\"$(shell which ld)\"


all: skullfuck

skullfuck: skullfuck.c
	$(CC) $(CFLAGS) $(MACROS) -o skullfuck skullfuck.c

run_tests: run_tests.c
	$(CC) $(CFLAGS) -o run_tests run_tests.c

hello: test/hello_world.bf
	./skullfuck -o hello test/hello_world.bf

rot13: test/rot13.bf
	./skullfuck -o rot13 test/rot13.bf

test: run_tests hello rot13
	./run_tests

clean: skullfuck
	rm -f skullfuck

.PHONY: clean test