Merge branch 'Teaman-ND' into Toastman-IPT-ND
[tomato.git] / release / src / router / httpd / Makefile
blob3eab7baa8194971164d8b7959a9a0ad733fa43bc
1 include ../common.mak
3 CFLAGS = -Os -Wall $(EXTRACFLAGS)
4 CFLAGS += -I$(SRCBASE) -I$(SRCBASE)/include -I. -I$(TOP)/shared
6 OBJS = httpd.o cgi.o tomato.o version.o
7 OBJS += misc.o dhcp.o upgrade.o traceping.o parser.o upnp.o ctnf.o
8 OBJS += nvram.o log.o webio.o wl.o devlist.o ddns.o config.o bwm.o
9 OBJS += blackhole.o utf8.o cpuinfo.o
10 OBJS += iptraffic.o
11 ifeq ($(TCONFIG_USB),y)
12 OBJS += usb.o
13 endif
15 ifeq ($(TCONFIG_NOCAT),y)
16 OBJS += nocat.o
17 endif
19 LIBS = -L$(TOP)/nvram -lnvram -L$(TOP)/shared -lshared
20 LIBS += -L$(TOP)/mssl -lmssl
22 ifeq ($(FULL_OPENSSL),y)
23 LIBS += -L$(TOP)/openssl -lssl -lcrypto
24 endif
26 all: httpd
28 httpd: $(OBJS)
29 @echo " [httpd] CC $@"
30 @$(CC) -o $@ $(OBJS) $(LIBS)
32 $(SIZECHECK)
33 $(CPTMP)
36 install:
37 @echo " [httpd] Installing to $(INSTALLDIR)"
38 @install -D httpd $(INSTALLDIR)/usr/sbin/httpd
39 @$(STRIP) $(INSTALLDIR)/usr/sbin/httpd
40 @chmod 0500 $(INSTALLDIR)/usr/sbin/httpd
42 clean:
43 rm -f httpd *.o .*.depend
45 size: httpd
46 mipsel-uclibc-nm --print-size --size-sort httpd
48 %.o: %.c .%.depend
49 @echo " [httpd] CC $@"
50 @$(CC) $(CFLAGS) -o $@ -c $<
52 .%.depend: %.c
53 @$(CC) $(CFLAGS) -M $< > $@
55 -include $(OBJS:%.o=.%.depend)