ar71xx: ag71xx: use dynamically allocated buffer for napi_stats
[openwrt.git] / package / uhttpd / src / Makefile
1 CGI_SUPPORT ?= 1
2 LUA_SUPPORT ?= 1
3 TLS_SUPPORT ?= 1
4
5 CFLAGS ?= -I./lua-5.1.4/src -I./cyassl-1.4.0/include -O0 -ggdb3
6 LDFLAGS ?= -L./lua-5.1.4/src -L./cyassl-1.4.0/src/.libs
7
8 CFLAGS += -Wall --std=gnu99
9
10 OBJ = uhttpd.o uhttpd-file.o uhttpd-utils.o
11 LIB = -Wl,--export-dynamic -lcrypt -ldl
12
13 TLSLIB =
14 LUALIB =
15
16 HAVE_SHADOW=$(shell echo 'int main(void){ return !getspnam("root"); }' | \
17 $(CC) -include shadow.h -xc -o/dev/null - 2>/dev/null && echo yes)
18
19 ifeq ($(HAVE_SHADOW),yes)
20 CFLAGS += -DHAVE_SHADOW
21 endif
22
23 world: compile
24
25 ifeq ($(CGI_SUPPORT),1)
26 OBJ += uhttpd-cgi.o
27 CFLAGS += -DHAVE_CGI
28 endif
29
30 ifeq ($(LUA_SUPPORT),1)
31 CFLAGS += -DHAVE_LUA
32 LUALIB = uhttpd_lua.so
33
34 $(LUALIB): uhttpd-lua.c
35 $(CC) $(CFLAGS) $(LDFLAGS) $(FPIC) \
36 -shared -lm -llua -ldl \
37 -o $(LUALIB) uhttpd-lua.c
38 endif
39
40 ifeq ($(TLS_SUPPORT),1)
41 CFLAGS += -DHAVE_TLS
42 TLSLIB = uhttpd_tls.so
43
44 $(TLSLIB): uhttpd-tls.c
45 $(CC) $(CFLAGS) $(LDFLAGS) $(FPIC) \
46 -shared -lcyassl \
47 -o $(TLSLIB) uhttpd-tls.c
48 endif
49
50 %.o: %.c
51 $(CC) $(CFLAGS) -c -o $@ $<
52
53 compile: $(OBJ) $(TLSLIB) $(LUALIB)
54 $(CC) -o uhttpd $(LDFLAGS) $(LIB) $(OBJ)
55
56 clean:
57 rm -f *.o *.so uhttpd
58
This page took 0.049526 seconds and 5 git commands to generate.