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
8 CFLAGS
+= -Wall
--std
=gnu99
10 OBJ
= uhttpd.o uhttpd-file.o uhttpd-utils.o
11 LIB
= -Wl
,--export-dynamic
-lcrypt
-ldl
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
)
19 ifeq ($(HAVE_SHADOW
),yes
)
20 CFLAGS
+= -DHAVE_SHADOW
25 ifeq ($(CGI_SUPPORT
),1)
30 ifeq ($(LUA_SUPPORT
),1)
32 LUALIB
= uhttpd_lua.so
34 $(LUALIB
): uhttpd-lua.c
35 $(CC
) $(CFLAGS
) $(LDFLAGS
) $(FPIC
) \
36 -shared
-lm
-llua
-ldl \
37 -o
$(LUALIB
) uhttpd-lua.c
40 ifeq ($(TLS_SUPPORT
),1)
42 TLSLIB
= uhttpd_tls.so
44 $(TLSLIB
): uhttpd-tls.c
45 $(CC
) $(CFLAGS
) $(LDFLAGS
) $(FPIC
) \
47 -o
$(TLSLIB
) uhttpd-tls.c
51 $(CC
) $(CFLAGS
) -c
-o
$@
$<
53 compile
: $(OBJ
) $(TLSLIB
) $(LUALIB
)
54 $(CC
) -o uhttpd
$(LDFLAGS
) $(LIB
) $(OBJ
)