webcit-ng makefile now handles changes to webcit.h properly
[citadel.git] / webcit-ng / Makefile
1 CFLAGS := $(CFLAGS) -ggdb -Wno-format-truncation
2 LDFLAGS := $(LDFLAGS)
3
4 SRC := server
5 OBJ := server
6
7 HEADERS := $(wildcard $(SRC)/*.h)
8 SOURCES := $(wildcard $(SRC)/*.c)
9 OBJECTS := $(patsubst $(SRC)/%.c, $(OBJ)/%.o, $(SOURCES))
10
11 webcit: $(OBJECTS)
12         gcc $(CFLAGS) $(OBJECTS) $(LDFLAGS) -lcitadel -lpthread -lcrypto -lssl -lexpat -o webcit
13
14 $(SRC)/%.c: $(HEADERS)
15         touch $@
16
17 $(OBJ)/%.o: $(SRC)/%.c
18         gcc $(CFLAGS) -I$(SRC) -c $< -o $@
19
20 # remove compilation products
21 clean:
22         rm -f webcit server/*.o
23
24 distclean: clean
25
26 # install to target directory
27 install:
28         echo Not yet...