summaryrefslogtreecommitdiff
path: root/Makefile
blob: 80510947d76e66d1b1cf92ebea1ac9d1b0d94c12 (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
28
BUILD := debug

cflags.debug := -Wall -o0 -g -DDEBUG=1
cflags.release := -os -s
CFLAGS := ${cflags.${BUILD}}

LIBS := -lcups -lmagic

CFLAGS += -L/usr/local/lib
CFLAGS += -I/usr/local/include

FILES := cgi.c http_parser.c

test: main
	./main.${BUILD}

test_param: main
	./main.${BUILD} --test1 -a -b -c --test2 --pidfile=foo --pidfile foobar

main: clean
	$(CC) $(CFLAGS) -o $@.${BUILD} $(FILES) main.c $(LIBS)

clean:
	rm -f ./main.${BUILD}

# %:
# 	$(CC) $(CFLAGS) -o $@ $(FILES) main.c $(LIBS)

..