aboutsummaryrefslogtreecommitdiff
path: root/broccoli/Makefile
blob: ea5465b5f67d6935768dca1790258ab9760845d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
CC=gcc
CFLAGS =-c -DBROCCOLI
INC =-I/usr/local/include -I/usr/local/include -I./includes
LDFLAGS =  -L/usr/local/lib -lbroccoli -pthread
SRC = midbropasad.c broevent.c fifoqueue.c
OBJ = $(patsubst %.c, build/%.o, $(SRC))

all: bin/midbropasad bin/tests

bin/midbropasad: $(OBJ)
	$(CC) $^ -o bin/midbropasad $(LDFLAGS)

build/%.o: src/%.c
	$(CC) $(CFLAGS) $(INC) $< -o $@

bin/tests: build/fifoqueue.o build/tests.o
	$(CC) $^ -o bin/tests $(LDFLAGS)

build/tests.o: test/tests.c
	$(CC) $(CFLAGS) $(INC) $< -o $@

clean:
	rm build/* bin/*