-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
36 lines (26 loc) · 796 Bytes
/
Makefile
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
CFLAGS+=-Wall -ggdb3 -DDEBUG
LDFLAGS+=-lcrypt
SRCS=$(shell ls *.c)
OBJS=file.o tags.o codewiki.o mime.o
DEPS= $(addsuffix .depend, $(OBJS))
CC?=gcc
.Make.config:
@echo Running configure
./configure
all: codewiki-fcgi codewiki-test .Make.config
include .Make.config
codewiki-test: $(OBJS) codewiki-test.o
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $+
codewiki-scgi: $(OBJS) codewiki-scgi.o
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $+ deps/libscgi/libscgi.a deps/libasn/libasn.a
codewiki-fcgi: $(OBJS) codewiki-fcgi.o
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $+ -lfcgi
%.o: %.c
@echo "Generating $@.depend"
@$(CC) -MM $(CFLAGS) $< | \
sed 's,^.*\.o[ :]*,$@ $@.depend : ,g' > $@.depend
$(CC) $(CFLAGS) -o $@ -c $<
clean:
rm -f codewiki-scgi $(OBJS) $(DEPS) .Make.config
-include $(DEPS)
.PHONY: all clean