uhttpd: make missing certs only fatal if tls sockets were requested
[project/luci.git] / contrib / package / uhttpd / src / Makefile
1 CGI_SUPPORT ?= 1
2 LUA_SUPPORT ?= 1
3 TLS_SUPPORT ?= 1
4
5 LDFLAGS ?= -L./lua-5.1.4/src -L./cyassl-1.4.0/src/.libs -lm
6 CFLAGS  ?= -Wall -I./lua-5.1.4/src -I./cyassl-1.4.0/include -O0 -ggdb3
7
8 CFLAGS += --std=c99 -D_POSIX_C_SOURCE=200112L -D_XOPEN_SOURCE=500
9 LDFLAGS += -lm -lcrypt
10
11 OBJ = uhttpd.o uhttpd-file.o uhttpd-utils.o
12
13 ifeq ($(CGI_SUPPORT),1)
14         OBJ += uhttpd-cgi.o
15         CFLAGS += -DHAVE_CGI
16 endif
17
18 ifeq ($(LUA_SUPPORT),1)
19         OBJ += uhttpd-lua.o
20         CFLAGS += -DHAVE_LUA
21         LDFLAGS += -ldl -llua
22 endif
23
24 ifeq ($(TLS_SUPPORT),1)
25         OBJ += uhttpd-tls.o
26         CFLAGS += -DHAVE_TLS
27         LDFLAGS += -lpthread -lz -lcyassl
28 endif
29
30 %.o: %.c
31         $(CC) $(CFLAGS) -c -o $@ $< 
32
33 compile: $(OBJ)
34         $(CC) -o uhttpd $(LDFLAGS) $(OBJ)
35
36 clean:
37         rm -f *.o uhttpd
38