summaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 28066bddaf5785b22a796bded3826e728766a3a9 (plain) (blame)
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
28
29
30
31
32
33
34
35
36
37
38
CC=gcc

CFLAGS=-D_GNU_SOURCE -std=c99 -pedantic 
DBG_FLAGS=-Wall -g -D_FOOD_DEBUG -fsanitize=address -O0

SRC=src/*.c

.PHONY: all debug clean

all: food cookbook #eval

food: $(SRC) food.c
	$(CC) $(CFLAGS) -o food $^ $(LIBS)

eval: $(SRC) eval.c
	$(CC) $(CFLAGS) -o eval $^ $(LIBS)

cookbook: $(SRC) cookbook.c
	$(CC) $(CFLAGS) -o cookbook $^ $(LIBS)

debug: CFLAGS += $(DBG_FLAGS)
debug: all

clean:
	rm -f *.o
	rm -f food eval cookbook

# tests:
# 	$(MAKE) -C test

# clean-tests:
# 	$(MAKE) clean -C test

# install: $(TARGET)
# 	@cp -v $(TARGET) /usr/local/bin/$(TARGET)

# uninstall:
# 	@rm -v /usr/local/bin/$(TARGET)