RT-AC66 3.0.0.4.374.130 core
[tomato.git] / release / src / router / httpd / Makefile
blob263d51ce8b4eb674a7344f6df6977e4c1dfec13e
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
10 OBJS += cpuinfo.o
11 OBJS += iptraffic.o
13 ifeq ($(TCONFIG_PPTPD),y)
14 OBJS += pptpd.o
15 endif
16 ifeq ($(TCONFIG_USB),y)
17 OBJS += usb.o
18 endif
20 ifeq ($(TCONFIG_NOCAT),y)
21 OBJS += nocat.o
22 endif
24 LIBS = -L$(TOP)/nvram -lnvram -L$(TOP)/shared -lshared
25 LIBS += -L$(TOP)/mssl -lmssl
27 ifeq ($(FULL_OPENSSL),y)
28 LIBS += -L$(TOP)/openssl -lssl -lcrypto
29 endif
31 all: httpd
33 httpd: $(OBJS)
34 @echo " [httpd] CC $@"
35 @$(CC) -o $@ $(OBJS) $(LIBS)
37 $(SIZECHECK)
38 $(CPTMP)
41 install:
42 @echo " [httpd] Installing to $(INSTALLDIR)"
43 @install -D httpd $(INSTALLDIR)/usr/sbin/httpd
44 @$(STRIP) $(INSTALLDIR)/usr/sbin/httpd
45 @chmod 0500 $(INSTALLDIR)/usr/sbin/httpd
47 clean:
48 rm -f httpd *.o .*.depend
50 size: httpd
51 mipsel-uclibc-nm --print-size --size-sort httpd
53 %.o: %.c .%.depend
54 @echo " [httpd] CC $@"
55 @$(CC) $(CFLAGS) -o $@ -c $<
57 .%.depend: %.c
58 @$(CC) $(CFLAGS) -M $< > $@
60 -include $(OBJS:%.o=.%.depend)