source: src/router/httpd/Makefile @ 31546

Last change on this file since 31546 was 31546, checked in by brainslayer, 2 months ago

enable syslog tab for all targets if syslog daemon is available

File size: 27.4 KB
Line 
1-include $(LINUXDIR)/.config
2CONFIG_WR941=
3CONFIG_WA901=
4CONFIG_DIR615I=
5CONFIG_MMS344=
6CONFIG_IPVS=
7CONFIG_RB2011=
8CONFIG_WR741=
9CONFIG_WZRAG300NH=
10CONFIG_DIR615E=
11CONFIG_WP543=
12CONFIG_WDR4300=
13CONFIG_WDR3500=
14CONFIG_WDR2543=
15CONFIG_WRT160NL=
16CONFIG_E2100L=
17CONFIG_DIR825C1=
18CONFIG_WZRG450NH=
19CONFIG_WZRG450=
20CONFIG_WZRG300NH2=
21CONFIG_BUFFALO=
22CONFIG_TPLINK=
23CONFIG_DIR825=
24CONFIG_WNDR3700=
25CONFIG_WR1043V2=
26CONFIG_WR841V9=
27CONFIG_WR650AC=
28CONFIG_E355AC=
29CONFIG_E380AC=
30CONFIG_E325N=
31
32#
33# milli_httpd Makefile
34#
35# Copyright 2001-2003, Broadcom Corporation
36# All Rights Reserved.
37#
38# KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM
39# SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
40# FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE.
41#
42# $Id: Makefile,v 1.6 2005/11/30 11:55:05 seg Exp $
43#
44include $(TOP)/.config
45
46ifneq ($(wildcard $(SRCBASE)/cy_conf.mak),)
47  include $(SRCBASE)/cy_conf.mak
48endif
49
50COPTS += $(MIPS16_OPT) -D_GNU_SOURCE
51
52BCFLAGS = $(COPTS)  -fPIC -DMEMLEAK_OVERRIDE
53
54ifeq ($(CONFIG_80211AC),y)
55BCFLAGS += -I. -I$(LINUXDIR)/brcm/$(ARCH)/include -Wall
56endif
57
58ifeq ($(CONFIG_MSSID),y)
59ifeq ($(CONFIG_BUFFALO),y)
60BCFLAGS += -I. -I$(TOP)/shared -I$(SRCBASE)/include.bcm -Wall -I$(SRCBASE)/ -Imodules
61else
62BCFLAGS += -I. -I$(TOP)/shared -I$(SRCBASE)/include.v24 -Wall -I$(SRCBASE)/ -Imodules
63endif
64else
65BCFLAGS += -I. -I$(TOP)/shared -I$(SRCBASE)/include.v23 -Wall -I$(SRCBASE)/ -Imodules
66endif
67
68ifeq ($(CONFIG_VFS),y)
69BCFLAGS += -I$(TOP)/vfs -DHAVE_VFS
70LDFLAGS += -L$(TOP)/vfs
71endif
72
73#CFLAGS += -Ilzma
74LDFLAGS += -L$(TOP)/nvram -L$(INSTALLDIR)/nvram/usr/lib -lnvram -L$(TOP)/shared  -L$(TOP)/libutils -lcrypt -ldl -lutils -lwireless
75#LDFLAGS        += -L$(TOP)/nvram -L$(INSTALLDIR)/nvram/usr/lib -lnvram -L$(TOP)/shared  -L$(TOP)/libutils -lcrypt -ldl -lutils -lwireless -L$(TOP)/jansson/src/.libs/ -ljansson
76
77BCFLAGS += -DLINUX -ffunction-sections -fdata-sections -Wl,--gc-sections
78
79ifeq ($(CONFIG_DIST),"micro")
80BCFLAGS += -DNEED_NOPRINTF
81endif
82ifneq ($(CONFIG_DIST),"micro-special")
83BCFLAGS += -DNEED_NOPRINTF
84endif
85
86
87CFLAGS = $(BCFLAGS) -I$(LINUXDIR)/brcm/shared/bcmwifi/include -I$(LINUXDIR)/brcm/$(ARCH)/shared/bcmwifi/include
88
89ifeq ($(CONFIG_SPECIALEDITION),y)
90CFLAGS += -DHAVE_SPECIALEDITION
91ADDOBJ = special.o
92endif
93
94ifeq ($(CONFIG_ANTIFLASH),y)
95CFLAGS += -DANTI_FLASH
96endif
97CFLAGS += -DDIST=\"$(CONFIG_DIST)\"
98CFLAGS += -DDIST_OPT=\"$(CONFIG_DIST_OPT)\"
99
100ifeq ($(CONFIG_NOAD),y)
101CFLAGS += -DHAVE_NOAD
102endif
103
104ifneq ($(CONFIG_TW6600),y)
105ifeq ($(CONFIG_DIST),"micro")
106CFLAGS += -DHAVE_MICRO
107CFLAGS += -DHAVE_EXTHELP
108endif
109ifeq ($(CONFIG_DIST),"micro-special")
110CFLAGS += -DHAVE_MICRO
111CFLAGS += -DHAVE_EXTHELP
112endif
113ifneq ($(CONFIG_DIST),"micro")
114ifneq ($(CONFIG_DIST),"micro-special")
115ifeq ($(CONFIG_EXTHELP),y)
116CFLAGS += -DHAVE_EXTHELP
117endif
118endif
119endif
120
121endif
122
123ifeq ($(CONFIG_ROUTERSTYLE),y)
124CFLAGS += -DHAVE_ROUTERSTYLE
125endif
126
127ifeq ($(CONFIG_LANGUAGE),y)
128CFLAGS += -DHAVE_LANGUAGE
129endif
130ifeq ($(CONFIG_GLAUCO),y)
131CFLAGS += -DHAVE_GLAUCO
132endif
133ifeq ($(CONFIG_NEPTUNE),y)
134CFLAGS += -DHAVE_NEPTUNE
135endif
136ifeq ($(CONFIG_SNMP),y)
137CFLAGS += -DHAVE_SNMP
138endif
139ifeq ($(CONFIG_WIVIZ),y)
140CFLAGS += -DHAVE_WIVIZ
141endif
142ifeq ($(CONFIG_WAVESAT),y)
143CFLAGS += -DHAVE_WAVESAT
144endif
145ifeq ($(CONFIG_OVERCLOCKING),y)
146CFLAGS += -DHAVE_OVERCLOCKING
147endif
148ifeq ($(CONFIG_RADLOCAL),y)
149CFLAGS += -DHAVE_RADLOCAL
150endif
151ifeq ($(CONFIG_WZRHPAG300NH),y)
152CFLAGS += -DHAVE_WZRHPAG300NH
153endif
154ifeq ($(CONFIG_80211AC),y)
155CFLAGS += -DHAVE_80211AC
156endif
157ifeq ($(CONFIG_NOAC),y)
158CFLAGS += -DHAVE_NOAC
159endif
160ifeq ($(CONFIG_WZRG450),y)
161CFLAGS += -DHAVE_WZRG450
162endif
163ifeq ($(CONFIG_WZR450HP2),y)
164CFLAGS += -DHAVE_WZR450HP2
165endif
166ifeq ($(CONFIG_WZRG300NH2),y)
167CFLAGS += -DHAVE_WZRG300NH2
168endif
169ifeq ($(CONFIG_WPA_SUPPLICANT),y)
170CFLAGS += -DHAVE_WPA_SUPPLICANT
171endif
172ifeq ($(CONFIG_WPA_SUPPLICANT2),y)
173CFLAGS += -DHAVE_WPA_SUPPLICANT
174endif
175ifeq ($(CONFIG_NOTRIAL),y)
176CFLAGS += -DHAVE_NOTRIAL
177endif
178ifeq ($(CONFIG_ACK),y)
179CFLAGS += -DHAVE_ACK
180endif
181ifeq ($(CONFIG_V25),y)
182CFLAGS += -DHAVE_V25
183endif
184ifeq ($(CONFIG_DIR860),y)
185CFLAGS += -DHAVE_DIR860
186endif
187ifeq ($(CONFIG_DIR859),y)
188CFLAGS += -DHAVE_DIR859
189endif
190ifeq ($(CONFIG_DIR869),y)
191CFLAGS += -DHAVE_DIR869
192endif
193ifeq ($(CONFIG_IPVS),y)
194CFLAGS += -DHAVE_IPVS
195endif
196ifeq ($(CONFIG_DIR862),y)
197CFLAGS += -DHAVE_DIR862
198endif
199ifeq ($(CONFIG_BCMMODERN),y)
200CFLAGS += -DHAVE_BCMMODERN
201endif
202ifeq ($(CONFIG_SYSLOG),y)
203CFLAGS += -DHAVE_SYSLOG -DHAVE_STATUS_SYSLOG
204endif
205ifeq ($(CONFIG_OCTEON),y)
206CFLAGS += -DHAVE_OCTEON
207endif
208ifeq ($(CONFIG_EROUTER),y)
209CFLAGS += -DHAVE_EROUTER
210OBJS += upgrade_x86.o
211endif
212ifeq ($(CONFIG_MULTICAST),y)
213CFLAGS += -DHAVE_MULTICAST
214endif
215ifeq ($(CONFIG_NP25G),y)
216CFLAGS += -DHAVE_NP25G
217endif
218ifeq ($(CONFIG_UNIWIP),y)
219CFLAGS += -DHAVE_UNIWIP
220endif
221ifeq ($(CONFIG_MMS344),y)
222CFLAGS += -DHAVE_MMS344
223endif
224ifeq ($(CONFIG_XD3200),y)
225CFLAGS += -DHAVE_XD3200
226endif
227ifeq ($(CONFIG_AP120C),y)
228CFLAGS += -DHAVE_AP120C
229endif
230ifeq ($(CONFIG_OLSRD),y)
231CFLAGS += -DHAVE_OLSRD
232endif
233ifeq ($(CONFIG_HOTPLUG2),y)
234CFLAGS += -DHAVE_HOTPLUG2
235endif
236ifeq ($(CONFIG_WRT54G2),y)
237CFLAGS += -DHAVE_WRT54G2
238endif
239ifeq ($(CONFIG_VF803),y)
240  CFLAGS += -DHAVE_VF803
241endif
242ifeq ($(CONFIG_MSTP),y)
243  CFLAGS += -DHAVE_MSTP
244endif
245ifeq ($(CONFIG_GWMF54G2),y)
246CFLAGS += -DHAVE_GWMF54G2
247endif
248ifeq ($(CONFIG_USBIP),y)
249CFLAGS += -DHAVE_USBIP
250endif
251ifeq ($(CONFIG_ESR6650),y)
252  CFLAGS += -DHAVE_ESR6650
253endif
254ifeq ($(CONFIG_SUBQUARTER),y)
255  CFLAGS += -DHAVE_SUBQUARTER
256endif
257ifeq ($(CONFIG_SANSFIL),y)
258  CFLAGS += -DHAVE_SANSFIL
259endif
260ifeq ($(CONFIG_MVEBU),y)
261CFLAGS += -DHAVE_MVEBU
262CFLAGS += -DHAVE_CPUTEMP
263endif
264ifeq ($(CONFIG_IPQ806X),y)
265CFLAGS += -DHAVE_IPQ806X
266CFLAGS += -DHAVE_CPUTEMP
267endif
268ifeq ($(CONFIG_ATH10K),y)
269CFLAGS += -DHAVE_CPUTEMP
270endif
271include $(TOP)/rules/generic.mk
272CFLAGS += $(DD_CFLAGS)
273
274ifeq ($(CONFIG_BUFFALO),y)
275CFLAGS += -DHAVE_BUFFALO -DDEFAULT_COUNTRY_CODE=\"$(CONFIG_DEFAULT_COUNTRYCODE)\"
276VISOBJS += bfwireless.o onlineupdateejs.o
277WEBSOBJS += onlineupdatewebs.o
278OBJS += onlineupdatecgi.o
279ifeq ($(CONFIG_IAS),y)
280VISOBJS += intatstart.o
281WEBSOBJS += intatstartwebs.o
282endif
283ifeq ($(CONFIG_GUESTPORT),y)
284CFLAGS += -DHAVE_GUESTPORT
285endif
286endif
287
288ifeq ($(CONFIG_FREECWMP),y)
289CFLAGS += -DHAVE_FREECWMP
290VISOBJS += freecwmp.o
291endif
292
293ifeq ($(CONFIG_UNFY),y)
294CLFAGS += -DHAVE_UNFY
295endif
296
297ifeq ($(CONFIG_IDEXX),y)
298CFLAGS += -DHAVE_IDEXX
299ifeq ($(CONFIG_IDEXX_WORLD),y)
300CFLAGS += -DHAVE_IDEXX_WORLD
301endif
302endif
303
304ifeq ($(CONFIG_IDEXX_SIGNATUR),y)
305CFLAGS += -DHAVE_IDEXX_SIGNATUR
306endif
307
308ifeq ($(CONFIG_FREECWMP),y)
309CFLAGS += -DHAVE_FREECWMP
310VISOBJS += freecwmp.o
311endif
312
313ifeq ($(CONFIG_UNFY),y)
314CLFAGS += -DHAVE_UNFY
315endif
316
317
318ifeq ($(CONFIG_RB500),y)
319CFLAGS += -DHAVE_RB500
320OBJS += upgrade_rb500.o
321else
322ifeq ($(CONFIG_WDR4900),y)
323OBJS += upgrade.o
324else
325
326
327ifneq ($(CONFIG_X86),y)
328ifneq ($(CONFIG_RB600),y)
329ifneq ($(CONFIG_EROUTER),y)
330ifeq ($(CONFIG_BUFFALO),y)
331ifeq ($(CONFIG_DEFAULT_COUNTRYCODE),JP)
332OBJS += upgrade_buffalo.o
333else
334OBJS += upgrade.o
335endif
336else
337OBJS += upgrade.o
338endif
339CFLAGS += -DHAVE_LOUD
340endif
341endif
342endif
343endif
344endif
345ifeq ($(CONFIG_DDLINK),y)
346  CFLAGS += -DHAVE_DDLINK
347endif
348ifeq ($(CONFIG_WPS),y)
349  CFLAGS += -DHAVE_WPS
350endif
351ifeq ($(CONFIG_AOSS),y)
352  CFLAGS += -DHAVE_AOSS
353endif
354ifeq ($(CONFIG_IAS),y)
355  CFLAGS += -DHAVE_IAS
356ifeq ($(CONFIG_IAS_NOPWD),y)
357  CFLAGS += -DCONFIG_IAS_NOPLNPWD
358endif
359endif
360ifeq ($(CONFIG_RELAYD),y)
361  CFLAGS += -DHAVE_RELAYD
362endif
363ifeq ($(CONFIG_LAGUNA),y)
364  CFLAGS += -DHAVE_LAGUNA
365  CFLAGS += -DHAVE_CPUTEMP
366  CFLAGS += -DHAVE_VOLT
367endif
368ifeq ($(CONFIG_VENTANA),y)
369  CFLAGS += -DHAVE_VENTANA
370  CFLAGS += -DHAVE_CPUTEMP
371  CFLAGS += -DHAVE_VOLT
372endif
373ifeq ($(CONFIG_AP83),y)
374  CFLAGS += -DHAVE_AP83
375endif
376ifeq ($(CONFIG_THOM),y)
377  CFLAGS += -DHAVE_THOM
378endif
379ifeq ($(CONFIG_WRT160NL),y)
380  CFLAGS += -DHAVE_WRT160NL
381endif
382ifeq ($(CONFIG_BONDING),y)
383  CFLAGS += -DHAVE_BONDING
384endif
385ifeq ($(CONFIG_IPETH),y)
386  CFLAGS += -DHAVE_IPETH
387endif
388ifeq ($(CONFIG_RTG32),y)
389  CFLAGS += -DHAVE_RTG32
390endif
391
392ifeq ($(CONFIG_XSCALE),y)
393CFLAGS += -DHAVE_XSCALE
394endif
395ifeq ($(CONFIG_FREERADIUS),y)
396CFLAGS += -DHAVE_FREERADIUS
397VISOBJS += freeradius.o
398WEBSOBJS += websfreeradius.o
399endif
400ifeq ($(CONFIG_POKER),y)
401CFLAGS += -DHAVE_POKER
402VISOBJS += poker.o
403WEBSOBJS += webspoker.o
404endif
405ifeq ($(CONFIG_PICO5),y)
406CFLAGS += -DHAVE_PICO5
407endif
408ifeq ($(CONFIG_PICO2),y)
409CFLAGS += -DHAVE_PICO2
410endif
411ifeq ($(CONFIG_OPENDPI),y)
412CFLAGS += -DHAVE_OPENDPI
413endif
414ifeq ($(CONFIG_BATMANADV),y)
415CFLAGS += -DHAVE_BATMANADV
416endif
417ifeq ($(CONFIG_NEXTMEDIA),y)
418CFLAGS += -DHAVE_NEXTMEDIA
419endif
420ifeq ($(CONFIG_RAIEXTRA),y)
421CFLAGS += -DHAVE_RAIEXTRA
422endif
423ifeq ($(CONFIG_PICO2HP),y)
424CFLAGS += -DHAVE_PICO2HP
425endif
426ifeq ($(CONFIG_CAMBRIA),y)
427  CFLAGS += -DHAVE_CAMBRIA
428endif
429ifeq ($(CONFIG_PWC),y)
430CFLAGS += -DHAVE_PWC
431endif
432ifeq ($(CONFIG_ATH9K),y)
433CFLAGS += -DHAVE_ATH9K
434endif
435ifeq ($(CONFIG_ATH10K),y)
436CFLAGS += -DHAVE_ATH10K
437endif
438ifeq ($(CONFIG_ERC),y)
439CFLAGS += -DHAVE_ERC
440endif
441ifeq ($(CONFIG_RUT500),y)
442CFLAGS += -DHAVE_RUT500
443endif
444ifeq ($(CONFIG_3G),y)
445CFLAGS += -DHAVE_3G
446endif
447ifeq ($(CONFIG_MAKSAT),y)
448CFLAGS += -DHAVE_MAKSAT
449endif
450ifeq ($(CONFIG_MAKSAT_BLANK),y)
451CFLAGS += -DHAVE_MAKSAT_BLANK
452endif
453ifeq ($(CONFIG_NOCOUNTRYSEL),y)
454CFLAGS += -DHAVE_NOCOUNTRYSEL
455endif
456ifdef CONFIG_DEFREGDOMAIN
457CFLAGS += -DHAVE_DEFREGDOMAIN=$(CONFIG_DEFREGDOMAIN)
458endif
459ifeq ($(CONFIG_GPSI),y)
460CFLAGS += -DHAVE_GPSI
461endif
462ifeq ($(CONFIG_TRIMAX),y)
463CFLAGS += -DHAVE_TRIMAX
464endif
465ifeq ($(CONFIG_IPV6),y)
466CFLAGS += -DHAVE_IPV6
467endif
468ifeq ($(CONFIG_ESPOD),y)
469CFLAGS += -DHAVE_ESPOD
470endif
471ifeq ($(CONFIG_WIKINGS),y)
472CFLAGS += -DHAVE_WIKINGS
473endif
474ifeq ($(CONFIG_SUB3),y)
475CFLAGS += -DHAVE_SUB3
476endif
477ifeq ($(CONFIG_SUB6),y)
478CFLAGS += -DHAVE_SUB6
479endif
480ifeq ($(CONFIG_SUB9),y)
481CFLAGS += -DHAVE_SUB9
482endif
483ifeq ($(CONFIG_SUB12),y)
484CFLAGS += -DHAVE_SUB12
485endif
486ifeq ($(CONFIG_CARLSONWIRELESS),y)
487CFLAGS += -DHAVE_CARLSONWIRELESS
488endif
489ifeq ($(CONFIG_IMMERSIVE),y)
490CFLAGS += -DHAVE_IMMERSIVE
491endif
492ifeq ($(CONFIG_IPR),y)
493CFLAGS += -DHAVE_IPR
494endif
495ifeq ($(CONFIG_ENEO),y)
496CFLAGS += -DHAVE_ENEO
497endif
498ifeq ($(CONFIG_ONNET),y)
499CFLAGS += -DHAVE_ONNET
500endif
501ifeq ($(CONFIG_ONNET_BLANK),y)
502CFLAGS += -DHAVE_ONNET_BLANK
503endif
504ifeq ($(CONFIG_RAYTRONIK),y)
505CFLAGS += -DHAVE_RAYTRONIK
506endif
507ifeq ($(CONFIG_VILIM),y)
508CFLAGS += -DHAVE_VILIM
509endif
510ifeq ($(CONFIG_TMK),y)
511CFLAGS += -DHAVE_TMK
512endif
513ifeq ($(CONFIG_BKM),y)
514CFLAGS += -DHAVE_BKM
515endif
516ifeq ($(CONFIG_KORENRON),y)
517CFLAGS += -DHAVE_KORENRON
518endif
519ifeq ($(CONFIG_TESTEM),y)
520CFLAGS += -DHAVE_TESTEM
521endif
522ifeq ($(CONFIG_HDWIFI),y)
523CFLAGS += -DHAVE_HDWIFI
524endif
525ifeq ($(CONFIG_HOBBIT),y)
526CFLAGS += -DHAVE_HOBBIT
527endif
528ifeq ($(CONFIG_STATUS_GPIO),y)
529CFLAGS += -DHAVE_STATUS_GPIO
530endif
531ifeq ($(CONFIG_SOLO51),y)
532CFLAGS += -DHAVE_SOLO51
533endif
534ifeq ($(CONFIG_RSTATS),y)
535CFLAGS += -DHAVE_RSTATS
536endif
537ifeq ($(CONFIG_VLANTAGGING),y)
538CFLAGS += -DHAVE_PORTSETUP
539endif
540ifeq ($(CONFIG_NOWIFI),y)
541CFLAGS += -DHAVE_NOWIFI
542endif
543
544ifeq ($(CONFIG_X86),y)
545CFLAGS += -DHAVE_X86
546OBJS += upgrade_x86.o
547endif
548ifeq ($(CONFIG_RB600),y)
549CFLAGS += -DHAVE_RB600
550
551ifneq ($(CONFIG_WDR4900),y)
552OBJS += upgrade_x86.o
553endif
554endif
555
556ifeq ($(CONFIG_MAGICBOX),y)
557CFLAGS += -DHAVE_MAGICBOX
558CFLAGS += -DHAVE_CPUTEMP
559endif
560ifeq ($(CONFIG_CPUTEMP),y)
561CFLAGS += -DHAVE_CPUTEMP
562endif
563ifeq ($(CONFIG_RADIUSPLUGIN),y)
564CFLAGS += -DHAVE_RADIUSPLUGIN
565endif
566ifeq ($(CONFIG_FONERA),y)
567CFLAGS += -DHAVE_FONERA
568endif
569ifeq ($(CONFIG_ALPHA),y)
570CFLAGS += -DHAVE_ALPHA
571endif
572ifeq ($(CONFIG_WIL6210),y)
573  CFLAGS += -DHAVE_WIL6210
574endif
575ifeq ($(CONFIG_ALPINE),y)
576CFLAGS += -DHAVE_ALPINE
577endif
578ifeq ($(CONFIG_EOC2610),y)
579CFLAGS += -DHAVE_EOC2610
580endif
581ifeq ($(CONFIG_EOC1650),y)
582CFLAGS += -DHAVE_EOC1650
583endif
584ifeq ($(CONFIG_ALLNETWRT),y)
585CFLAGS += -DHAVE_ALLNETWRT
586endif
587ifeq ($(CONFIG_FONERA2200),y)
588CFLAGS += -DHAVE_FONERA2200
589endif
590ifeq ($(CONFIG_DIR400),y)
591CFLAGS += -DHAVE_DIR400
592endif
593ifeq ($(CONFIG_DIR825),y)
594  CFLAGS += -DHAVE_DIR825
595endif
596ifeq ($(CONFIG_XR4SPECIAL),y)
597CFLAGS += -DHAVE_XR4SPECIAL
598endif
599ifeq ($(CONFIG_DIR300),y)
600CFLAGS += -DHAVE_DIR300
601endif
602ifeq ($(CONFIG_USR5453),y)
603CFLAGS += -DHAVE_USR5453
604endif
605ifeq ($(CONFIG_MR3202A),y)
606CFLAGS += -DHAVE_MR3202A
607endif
608ifeq ($(CONFIG_WRK54G),y)
609CFLAGS += -DHAVE_WRK54G
610endif
611ifeq ($(CONFIG_MERAKI),y)
612CFLAGS += -DHAVE_MERAKI
613endif
614ifeq ($(CONFIG_LS2),y)
615CFLAGS += -DHAVE_LS2
616endif
617ifeq ($(CONFIG_WP543),y)
618  CFLAGS += -DHAVE_WP543
619endif
620ifeq ($(CONFIG_WP546),y)
621  CFLAGS += -DHAVE_WP546
622endif
623ifeq ($(CONFIG_NS2),y)
624CFLAGS += -DHAVE_NS2
625endif
626ifeq ($(CONFIG_LC2),y)
627CFLAGS += -DHAVE_LC2
628endif
629ifeq ($(CONFIG_LC5),y)
630CFLAGS += -DHAVE_LC5
631endif
632ifeq ($(CONFIG_NS5),y)
633CFLAGS += -DHAVE_NS5
634endif
635ifeq ($(CONFIG_EOC5610),y)
636CFLAGS += -DHAVE_EOC5610
637endif
638ifeq ($(CONFIG_LS5),y)
639CFLAGS += -DHAVE_LS5
640endif
641ifeq ($(CONFIG_WHRAG108),y)
642CFLAGS += -DHAVE_WHRAG108
643endif
644ifeq ($(CONFIG_TW6600),y)
645CFLAGS += -DHAVE_TW6600
646endif
647ifeq ($(CONFIG_CA8),y)
648CFLAGS += -DHAVE_CA8
649endif
650ifeq ($(CONFIG_CA8PRO),y)
651CFLAGS += -DHAVE_CA8PRO
652endif
653ifeq ($(CONFIG_NOP8670),y)
654CFLAGS += -DHAVE_NOP8670
655CFLAGS += -DHAVE_GATEWORX
656else
657ifeq ($(CONFIG_TONZE),y)
658CFLAGS += -DHAVE_TONZE
659endif
660ifeq ($(CONFIG_WG302),y)
661CFLAGS += -DHAVE_WG302
662endif
663ifeq ($(CONFIG_DSL_CPE_CONTROL),y)
664CFLAGS += -DHAVE_DSL_CPE_CONTROL
665endif
666
667ifeq ($(CONFIG_GATEWORX),y)
668CFLAGS += -DHAVE_GATEWORX
669ifneq ($(CONFIG_WRT300NV2),y)
670ifneq ($(CONFIG_WG302),y)
671CFLAGS += -DHAVE_CPUTEMP
672CFLAGS += -DHAVE_VOLT
673endif
674endif
675endif
676endif
677
678ifeq ($(REGDOMAIN_OVERRIDE),y)
679CFLAGS += -DREGDOMAIN_OVERRIDE
680endif
681
682ifeq ($(CONFIG_34TELECOM),y)
683CFLAGS += -DHAVE_34TELECOM
684endif
685ifeq ($(CONFIG_VLANTAGGING),y)
686CFLAGS += -DHAVE_VLANTAGGING
687endif
688#ifeq ($(CONFIG_MDHCP),y)
689CFLAGS += -DHAVE_MDHCP
690#endif
691
692ifeq ($(CONFIG_DDLAN),y)
693CFLAGS += -DHAVE_DDLAN
694endif
695
696ifeq ($(CONFIG_CORENET),y)
697CFLAGS += -DHAVE_CORENET
698endif
699ifeq ($(CONFIG_XIOCOM),y)
700CFLAGS += -DHAVE_XIOCOM
701endif
702
703ifeq ($(CONFIG_GGEW),y)
704CFLAGS += -DHAVE_GGEW
705endif
706ifeq ($(CONFIG_TELCOM),y)
707CFLAGS += -DHAVE_TELCOM
708endif
709ifeq ($(CONFIG_MYNETWAY),y)
710  CFLAGS += -DHAVE_MYNETWAY
711endif
712
713
714ifeq ($(CONFIG_PPPOE),y)
715CFLAGS += -DHAVE_PPPOE
716CFLAGS += -DHAVE_PPPOEDUAL
717endif
718ifeq ($(CONFIG_PPPOATM),y)
719CFLAGS += -DHAVE_PPPOATM
720endif
721ifeq ($(CONFIG_MODEMBRIDGE),y)
722CFLAGS += -DHAVE_MODEMBRIDGE
723endif
724ifeq ($(CONFIG_WMBR_G300NH),y)
725CFLAGS += -DHAVE_WMBR_G300NH
726endif
727
728ifeq ($(CONFIG_CTORRENT),y)
729CFLAGS += -DHAVE_CTORRENT
730endif
731
732ifeq ($(CONFIG_PWC),y)
733CFLAGS += -DHAVE_PWC
734endif
735
736ifeq ($(CONFIG_UPNP),y)
737CFLAGS += -DHAVE_UPNP
738endif
739
740ifeq ($(CONFIG_RFLOW),y)
741CFLAGS += -DHAVE_RFLOW
742endif
743
744ifeq ($(CONFIG_BIRD),y)
745CFLAGS += -DHAVE_BIRD
746endif
747ifeq ($(CONFIG_QUAGGA),y)
748CFLAGS += -DHAVE_QUAGGA
749endif
750ifeq ($(CONFIG_PPTP),y)
751CFLAGS += -DHAVE_PPTP
752endif
753ifeq ($(CONFIG_PPTPD),y)
754CFLAGS += -DHAVE_PPTPD
755VISOBJS += pptp.o
756endif
757ifeq ($(CONFIG_L2TP),y)
758CFLAGS += -DHAVE_L2TP
759endif
760ifeq ($(CONFIG_HEARTBEAT),y)
761CFLAGS += -DHAVE_HEARTBEAT
762endif
763ifeq ($(CONFIG_EOP_TUNNEL),y)
764CFLAGS += -DHAVE_EOP_TUNNEL
765endif
766ifeq ($(CONFIG_CHILLILOCAL),y)
767CFLAGS += -DHAVE_CHILLILOCAL
768endif
769
770ifeq ($(CONFIG_CHILLISPOT),y)
771CFLAGS += -DHAVE_CHILLI
772endif
773ifeq ($(CONFIG_DLM101),y)
774  CFLAGS += -DHAVE_DLM101
775endif
776
777ifeq ($(CONFIG_QTN),y)
778CFLAGS += -DHAVE_QTN  -DRPCOVERRIDE
779endif
780
781
782ifeq ($(CONFIG_FTP),y)
783LDFLAGS += -Wl,-rpath,$(TOP)/jansson/src/.libs
784LDFLAGS +=-L$(TOP)/jansson/src/.libs -ljansson
785CFLAGS += -DHAVE_NAS_SERVER
786endif
787
788ifeq ($(CONFIG_SAMBA3),y)
789LDFLAGS += -Wl,-rpath,$(TOP)/jansson/src/.libs
790LDFLAGS +=-L$(TOP)/jansson/src/.libs -ljansson
791CFLAGS += -DHAVE_NAS_SERVER
792CFLAGS += -DHAVE_SAMBA_SERVER
793endif
794
795ifeq ($(CONFIG_MINIDLNA),y)
796LDFLAGS += -Wl,-rpath,$(TOP)/jansson/src/.libs
797LDFLAGS +=-L$(TOP)/jansson/src/.libs -ljansson
798CFLAGS += -DHAVE_MINIDLNA
799endif
800
801ifeq ($(CONFIG_PRIVOXY),y)
802CFLAGS += -DHAVE_PRIVOXY
803endif
804
805ifeq ($(CONFIG_WEBSERVER),y)
806CFLAGS += -DHAVE_WEBSERVER
807endif
808
809ifeq ($(CONFIG_SPUTNIK_APD),y)
810CFLAGS += -DHAVE_SPUTNIK_APD
811VISOBJS += sputnik.o
812endif
813ifeq ($(CONFIG_USB),y)
814CFLAGS += -DHAVE_USB
815endif
816ifeq ($(CONFIG_DROPBEAR_SSHD),y)
817CFLAGS += -DHAVE_SSHD
818endif
819ifeq ($(CONFIG_REGISTER),y)
820CFLAGS += -DHAVE_REGISTER -DNOMAIN
821#OBJS += crc.o register.c
822REGOBJS = $(TOP)/register/register.c
823REGOBJS2 = $(TOP)/register/register_vis.o
824ifneq ($(CONFIG_DIST),"micro")
825ifneq ($(CONFIG_DIST),"micro-special")
826#REGOBJS2 = $(TOP)/register/register_check.c
827endif
828endif
829endif
830ifeq ($(CONFIG_SUPERCHANNEL),y)
831CFLAGS += -DHAVE_SUPERCHANNEL
832#OBJS += crc.o register.c
833REGOBJS = $(TOP)/register/register.c
834REGOBJS2 = $(TOP)/register/register_vis.o
835endif
836#ifeq ($(HSIAB_SUPPORT),1)
837#CFLAGS += -I$(TOP)/hsiab
838#LDFLAGS += -L$(TOP)/openssl -L$(TOP)/hsiab -lcrypto -lssl -lhsiab
839#OBJS += hsiab.o
840#endif
841#ifeq ($(HTTPS_SUPPORT),1)
842#CFLAGS += -I$(TOP)/openssl/include  -I$(TOP)/openssl/include/openssl
843#LDFLAGS += -L$(TOP)/openssl -L../openssl -lcrypto -lssl
844#endif
845#ifeq ($(BACKUP_RESTORE_SUPPORT),1)
846#OBJS  += $(SRCBASE)/../tools/src/code_header.o backup_restore.o
847#endif
848
849ifeq ($(CONFIG_MASKMAC),y)
850CFLAGS += -DMASKMAC
851CFLAGS += -DFBNFW
852endif
853
854
855ifeq ($(DDM_SUPPORT),1)
856OBJS  += ddm.o
857endif
858
859ifeq ($(CONFIG_ZEROIP),y)
860CFLAGS += -DHAVE_ZEROIP
861endif
862
863ifeq ($(CONFIG_WRT300NV2),y)
864CFLAGS += -DHAVE_WRT300NV2
865endif
866ifeq ($(CONFIG_FON),y)
867CFLAGS += -DHAVE_FON
868endif
869ifeq ($(CONFIG_NORTHSTAR),y)
870CFLAGS += -DHAVE_NORTHSTAR
871endif
872
873ifeq ($(CONFIG_OPENVPN),y)
874CFLAGS += -DHAVE_OPENVPN
875endif
876
877
878ifeq ($(CONFIG_BOESE),y)
879CFLAGS += -DBOESE=1
880endif
881ifeq ($(CONFIG_WILLIAM),y)
882CFLAGS += -DWILLIAM=1
883endif
884ifeq ($(ARCHITECTURE),broadcom)
885ifneq ($(CONFIG_MADWIFI),y)
886VISOBJS += wireless_broadcom.o
887endif
888endif
889ifeq ($(ARCHITECTURE),northstar)
890ifneq ($(CONFIG_MADWIFI),y)
891VISOBJS += wireless_broadcom.o
892endif
893endif
894
895
896
897ifeq ($(CONFIG_MADWIFI_MIMO),y)
898CFLAGS += -DHAVE_MADWIFI -DHAVE_MADWIFI_MIMO -DHAVE_ACK -I../madwifi.dev/madwifi.dev -include ../madwifi.dev/madwifi.dev/include/compat.h -DATH_USE_COMMONHAL
899ifneq ($(ARCHITECTURE),broadcom)
900CFLAGS += -DHAVE_RELAYD
901endif
902NCFLAGS += $(BCFLAGS) -DHAVE_MADWIFI -DHAVE_MADWIFI_MIMO -DHAVE_ACK -I../madwifi.dev/madwifi_mimo.dev/core -include ../madwifi.dev/madwifi_mimo.dev/core/include/compat.h  -DATH_USE_COMMONHAL
903NVISOBJS += wireless_madwifi11n.o
904NVISFILES += visuals/wireless_madwifi11n.c
905endif
906
907ifeq ($(CONFIG_ATH9K),y)
908LDFLAGS += -L$(TOP)/libnl-tiny -lnl-tiny
909ATH9KVISOBJS += wireless_madwifiath9k.o
910ATH9KVISFILES += visuals/wireless_madwifiath9k.c
911endif
912
913
914ifeq ($(CONFIG_MADWIFI),y)
915ifneq ($(ARCHITECTURE),broadcom)
916CFLAGS += -DHAVE_RELAYD
917endif
918ifeq ($(CONFIG_MADWIFI_MIMO),y)
919CFLAGS += -DHAVE_MADWIFI -DHAVE_MADWIFI_MIMO -DHAVE_ACK -I../madwifi.dev/madwifi.dev -include ../madwifi.dev/madwifi.dev/include/compat.h -DATH_USE_COMMONHAL
920VISOBJS += wireless_madwifi.o
921else
922CFLAGS += -DHAVE_MADWIFI -DHAVE_ACK -I../madwifi.dev/madwifi.dev -include ../madwifi.dev/madwifi.dev/include/compat.h
923VISOBJS += wireless_madwifi.o
924endif
925
926#OBJS += ../wireless-tools/libiw.so.29
927endif
928
929ifeq ($(CONFIG_CDEBUG),y)
930CFLAGS += -DCDEBUG
931endif
932
933CFLAGS += -DHAVE_AQOS
934
935ifeq ($(CONFIG_NET_SCH_CODEL),y)
936CFLAGS += -DHAVE_CODEL
937endif
938ifeq ($(CONFIG_NET_SCH_CODEL),m)
939CFLAGS += -DHAVE_CODEL
940endif
941
942ifeq ($(CONFIG_NET_SCH_FQ_CODEL),y)
943CFLAGS += -DHAVE_FQ_CODEL
944endif
945ifeq ($(CONFIG_NET_SCH_FQ_CODEL),m)
946CFLAGS += -DHAVE_FQ_CODEL
947endif
948
949ifeq ($(CONFIG_NET_SCH_PIE),y)
950CFLAGS += -DHAVE_PIE
951endif
952ifeq ($(CONFIG_NET_SCH_PIE),m)
953CFLAGS += -DHAVE_PIE
954endif
955
956ifeq ($(CONFIG_WTS),y)
957CFLAGS += -DHAVE_WTS
958endif
959
960ifeq ($(CONFIG_OMNI),y)
961CFLAGS += -DHAVE_OMNI
962endif
963
964
965ifeq ($(CONFIG_SKYTEL),y)
966CFLAGS += -DHAVE_SKYTEL
967endif
968ifeq ($(CONFIG_BUFFALO),y)
969CFLAGS += -DHAVE_BUFFALO
970endif
971ifeq ($(CONFIG_BUFFALO_SA),y)
972CFLAGS += -DHAVE_BUFFALO_SA
973endif
974ifeq ($(CONFIG_SPOTPASS),y)
975CFLAGS += -DHAVE_SPOTPASS
976endif
977
978ifeq ($(CONFIG_EASY_WIRELESS_CONFIG),y)
979CFLAGS += -DHAVE_EASY_WIRELESS_CONFIG
980endif
981ifeq ($(CONFIG_MADWIFI),y)
982CFLAGS += -DHAVE_EASY_WIRELESS_CONFIG
983endif
984ifeq ($(CONFIG_MADWIFI_MIMO),y)
985CFLAGS += -DHAVE_EASY_WIRELESS_CONFIG
986endif
987ifeq ($(CONFIG_MADWIFI_ATH9K),y)
988CFLAGS += -DHAVE_EASY_WIRELESS_CONFIG
989endif
990
991ifeq ($(CONFIG_IFL),y)
992CFLAGS += -DHAVE_IFL
993endif
994
995ifeq ($(CONFIG_SKYTRON),y)
996CFLAGS += -DHAVE_SKYTRON
997endif
998
999
1000ifeq ($(CONFIG_DLS),y)
1001CFLAGS += -DHAVE_DLS
1002endif
1003
1004ifeq ($(CONFIG_NOTRANS),y)
1005CFLAGS += -DHAVE_NOTRANS
1006endif
1007
1008ifeq ($(CONFIG_MACBIND),y)
1009CFLAGS += -DHAVE_MACBIND
1010endif
1011
1012ifeq ($(CONFIG_POWERNOC),y)
1013CFLAGS += -DHAVE_POWERNOC
1014endif
1015ifeq ($(CONFIG_R2M),y)
1016  CFLAGS += -DHAVE_R2M
1017endif
1018ifeq ($(CONFIG_R5M),y)
1019  CFLAGS += -DHAVE_R5M
1020endif
1021ifeq ($(CONFIG_BS2MHP),y)
1022  CFLAGS += -DHAVE_BS2MHP
1023endif
1024ifeq ($(CONFIG_BS5MHP),y)
1025  CFLAGS += -DHAVE_BS5MHP
1026endif
1027ifeq ($(CONFIG_NS2M),y)
1028  CFLAGS += -DHAVE_NS2M
1029endif
1030ifeq ($(CONFIG_NS5M),y)
1031  CFLAGS += -DHAVE_NS5M
1032endif
1033
1034ifeq ($(CONFIG_FREEBIRD),y)
1035CFLAGS += -DCONFIG_FREEBIRD
1036endif
1037
1038ifeq ($(CONFIG_BRANDING),y)
1039CFLAGS += -DHAVE_BRANDING
1040endif
1041
1042ifeq ($(ARP_TABLE_SUPPORT),1)
1043OBJS  += arp.o
1044endif
1045ifeq ($(CONFIG_UBNTM),y)
1046CFLAGS += -DHAVE_UBNTM
1047endif
1048
1049ifeq ($(EMI_TEST),1)
1050OBJS  += emi_test.o
1051endif
1052ifeq ($(DEBUG_WEB),1)
1053CFLAGS += -DMY_DEBUG
1054endif
1055ifeq ($(CONFIG_WOL),y)
1056CFLAGS += -DHAVE_WOL
1057endif
1058ifeq ($(CONFIG_PB42),y)
1059CFLAGS += -DHAVE_PB42
1060endif
1061ifeq ($(CONFIG_RS),y)
1062CFLAGS += -DHAVE_RS
1063endif
1064ifeq ($(CONFIG_JA76PF),y)
1065  CFLAGS += -DHAVE_JA76PF
1066endif
1067ifeq ($(CONFIG_ALFAAP94),y)
1068  CFLAGS += -DHAVE_ALFAAP94
1069endif
1070ifeq ($(CONFIG_JWAP003),y)
1071  CFLAGS += -DHAVE_JWAP003
1072endif
1073ifeq ($(CONFIG_UNBOUND),y)
1074  CFLAGS += -DHAVE_UNBOUND
1075endif
1076ifeq ($(CONFIG_LSX),y)
1077CFLAGS += -DHAVE_LSX
1078endif
1079ifeq ($(CONFIG_WZRG300NH),y)
1080CFLAGS += -DHAVE_WZRG300NH
1081endif
1082ifeq ($(CONFIG_WHR300HP2),y)
1083CFLAGS += -DHAVE_WHR300HP2
1084endif
1085ifeq ($(CONFIG_WHRHPGN),y)
1086CFLAGS += -DHAVE_WHRHPGN
1087endif
1088ifeq ($(CONFIG_WZR300HP),y)
1089CFLAGS += -DHAVE_WZR300HP
1090endif
1091ifeq ($(CONFIG_WZR600DHP),y)
1092CFLAGS += -DHAVE_WZR600DHP
1093endif
1094ifeq ($(CONFIG_MT7620),y)
1095CFLAGS += -DHAVE_MT7620
1096endif
1097ifeq ($(CONFIG_HORNET),y)
1098CFLAGS += -DHAVE_HORNET
1099endif
1100ifeq ($(CONFIG_WASP),y)
1101CFLAGS += -DHAVE_WASP
1102endif
1103ifeq ($(CONFIG_WR650AC),y)
1104CFLAGS += -DHAVE_WR650AC
1105endif
1106ifeq ($(CONFIG_E355AC),y)
1107CFLAGS += -DHAVE_E355AC
1108endif
1109ifeq ($(CONFIG_E325N),y)
1110CFLAGS += -DHAVE_E325N
1111endif
1112ifeq ($(CONFIG_E380AC),y)
1113CFLAGS += -DHAVE_E380AC
1114endif
1115ifeq ($(CONFIG_DANUBE),y)
1116CFLAGS += -DHAVE_DANUBE
1117endif
1118ifeq ($(CONFIG_STORM),y)
1119CFLAGS += -DHAVE_STORM
1120endif
1121ifeq ($(CONFIG_WBD222),y)
1122  CFLAGS += -DHAVE_WBD222
1123endif
1124ifeq ($(CONFIG_OPENRISC),y)
1125CFLAGS += -DHAVE_OPENRISC
1126endif
1127ifeq ($(CONFIG_WP54G),y)
1128CFLAGS += -DHAVE_WP54G
1129endif
1130ifeq ($(CONFIG_ADM5120),y)
1131CFLAGS += -DHAVE_ADM5120
1132endif
1133ifeq ($(CONFIG_JJAP93),y)
1134CFLAGS += -DHAVE_JJAP93
1135endif
1136ifeq ($(CONFIG_DAP2230),y)
1137CFLAGS += -DHAVE_DAP2230
1138endif
1139ifeq ($(CONFIG_DAP3320),y)
1140CFLAGS += -DHAVE_DAP3320
1141endif
1142ifeq ($(CONFIG_DAP2330),y)
1143CFLAGS += -DHAVE_DAP2330
1144endif
1145ifeq ($(CONFIG_DAP2660),y)
1146CFLAGS += -DHAVE_DAP2660
1147endif
1148ifeq ($(CONFIG_DAP3662),y)
1149  CFLAGS += -DHAVE_DAP3662
1150endif
1151
1152
1153ifeq ($(CONFIG_TIEXTRA1),y)
1154CFLAGS += -DHAVE_TIEXTRA1 -Wl,-rpath,$(TOP)/jansson/src/.libs
1155LDFLAGS +=   -Wl,-rpath,$(TOP)/jansson/src/.libs
1156VISOBJS  += $(TOP)/private/telkom/mchillispotejs.o
1157WEBSOBJS  += $(TOP)/private/telkom/mchillispotvalidate.o
1158endif
1159ifeq ($(CONFIG_TIEXTRA2),y)
1160CFLAGS += -DHAVE_TIEXTRA2 -Wl,-rpath,$(TOP)/jansson/src/.libs
1161LDFLAGS +=   -Wl,-rpath,$(TOP)/jansson/src/.libs
1162VISOBJS  += $(TOP)/private/telkom/mwifidogejs.o
1163WEBSOBJS  += $(TOP)/private/telkom/mwifidogvalidate.o
1164endif
1165
1166ifeq ($(SAMBA_SUPPORT),1)
1167OBJS  += samba.o
1168endif
1169ifeq ($(CONFIG_SAMBA),y)
1170CFLAGS += -DHAVE_SAMBA
1171endif
1172ifeq ($(CONFIG_JFFS2),y)
1173CFLAGS += -DHAVE_JFFS2
1174endif
1175ifeq ($(CONFIG_MMC),y)
1176CFLAGS += -DHAVE_MMC
1177endif
1178#ifeq ($(HW_QOS_SUPPORT),1)
1179#OBJS  += qos.o
1180#endif
1181ifeq ($(PERFORMANCE_SUPPORT),1)
1182OBJS  += performance.o
1183endif
1184#ifeq ($(WL_STA_SUPPORT),1)
1185VISOBJS  += site_survey.o
1186#endif
1187
1188ifeq ($(CONFIG_PPPOESERVER),y)
1189CFLAGS += -DHAVE_PPPOESERVER
1190VISOBJS += chaps.o
1191endif
1192
1193ifeq ($(CONFIG_MILKFISH),y)
1194CFLAGS += -DHAVE_MILKFISH
1195VISOBJS += milkfish.o
1196endif
1197
1198ifeq ($(CONFIG_RT2880),y)
1199  CFLAGS += -DHAVE_RT2880
1200  VISOBJS += wireless_ralink.o
1201endif
1202ifeq ($(CONFIG_RT61),y)
1203  CFLAGS += -DHAVE_RT2880
1204  CFLAGS += -DHAVE_RT61
1205  VISOBJS += wireless_ralink.o
1206endif
1207ifeq ($(CONFIG_RT3052),y)
1208  CFLAGS += -DHAVE_RT2880  -DHAVE_RT3052
1209endif
1210ifeq ($(CONFIG_WHRG300N),y)
1211  CFLAGS += -DHAVE_WHRG300N
1212endif
1213ifeq ($(CONFIG_WR5422),y)
1214  CFLAGS += -DHAVE_WR5422
1215endif
1216ifeq ($(CONFIG_WHRHPGN),y)
1217CFLAGS += -DHAVE_WHRHPGN
1218endif
1219ifeq ($(CONFIG_WHRG300NV2),y)
1220CFLAGS += -DHAVE_WHRG300NV2
1221endif
1222ifeq ($(CONFIG_WHRHPG300N),y)
1223CFLAGS += -DHAVE_WHRHPG300N
1224endif
1225ifeq ($(CONFIG_CUSTOMSSLCERT),y)
1226CFLAGS += -DHAVE_CUSTOMSSLCERT
1227endif
1228
1229
1230
1231#use this do disable number of arguments checking (less code and faster exec)
1232CFLAGS += -DFASTWEB
1233
1234#JSON encoding/decoding
1235CFLAGS += -I$(TOP)/jansson/src
1236
1237#OBJS += http.o
1238
1239ifneq ($(CONFIG_NOSSL),y)
1240ifeq ($(CONFIG_OPENSSL),y)
1241ifeq ($(CONFIG_FREERADIUS),y)
1242CONFIG_MATRIXSSL=n
1243endif
1244ifeq ($(CONFIG_ASTERISK),y)
1245CONFIG_MATRIXSSL=n
1246endif
1247ifeq ($(CONFIG_AIRCRACK),y)
1248CONFIG_MATRIXSSL=n
1249endif
1250ifeq ($(CONFIG_POUND),y)
1251CONFIG_MATRIXSSL=n
1252endif
1253ifeq ($(CONFIG_IPETH),y)
1254CONFIG_MATRIXSSL=n
1255endif
1256ifeq ($(CONFIG_VPNC),y)
1257CONFIG_MATRIXSSL=n
1258endif
1259ifeq ($(CONFIG_TOR),y)
1260CONFIG_MATRIXSSL=n
1261endif
1262endif
1263ifeq ($(CONFIG_POLARSSL),y)
1264CONFIG_MATRIXSSL=n
1265CFLAGS += -I$(TOP)/polarssl/include
1266SSLLDFLAGS += -L$(TOP)/polarssl/library -lpolarssl -lpthread
1267CFLAGS += -DHAVE_POLARSSL
1268CFLAGS += -DHAVE_HTTPS
1269endif
1270
1271ifneq ($(CONFIG_MATRIXSSL),y)
1272ifeq ($(CONFIG_OPENSSL),y)
1273CFLAGS += -I$(TOP)/openssl/include  -I$(TOP)/openssl/include/openssl
1274SSLLDFLAGS += -L$(TOP)/openssl -L$(TOP)/openssl -L$(TOP)/zlib -lssl -lcrypto
1275CFLAGS += -DHAVE_OPENSSL
1276CFLAGS += -DHAVE_HTTPS
1277endif
1278endif
1279
1280
1281ifeq ($(CONFIG_MATRIXSSL),y)
1282#CONFIG_XYSSL=y
1283
1284CFLAGS += -I$(TOP)/matrixssl
1285SSLLDFLAGS += -L$(TOP)/matrixssl/src -lmatrixsslstatic -lpthread
1286CFLAGS += -DHAVE_MATRIXSSL
1287CFLAGS += -DHAVE_HTTPS
1288OBJS += matrixssl_xface.o
1289endif
1290
1291
1292endif
1293
1294#OBJS  += common.o server.o
1295#OBJS  += code_header.o
1296
1297
1298
1299vpath %.c modules modules/special.$(ARCH) $(SRCBASE)/../tools/src validate visuals ../private/buffalo ../private/buffalo/intatstart/httpd/validate ../private/buffalo/intatstart/httpd/visuals
1300
1301
1302all: generate validate.so visuals.so httpd cert
1303
1304generate:
1305        gcc -o gen gen.c
1306        ./gen > webs.h
1307
1308clean:
1309        rm -f *.o *~ httpd
1310        rm -f modules/*.o
1311        rm -f modules/*.*~
1312        rm -f validate/*.*~
1313        rm -f visuals/*.*~
1314        rm -f *.a
1315        #Added by Daniel(2004-07-29)
1316        #cp ../shared/ezc.o ./
1317        #rm -rf $(SRCBASE)/../tools/src/code_header.o   
1318
1319install:
1320#       lzma e www www.lz
1321ifneq ($(CONFIG_LITE),y)
1322        install -D www $(INSTALLDIR)/etc/www
1323        install -D httpd $(INSTALLDIR)/usr/sbin/httpd
1324        mkdir -p $(INSTALLDIR)/usr/lib
1325        install -D validate.so $(INSTALLDIR)/usr/lib
1326        install -D visuals.so $(INSTALLDIR)/usr/lib
1327ifneq ($(CONFIG_NOSSL),y)
1328        install -d $(INSTALLDIR)/etc
1329        install *.pem $(INSTALLDIR)/etc
1330endif
1331endif
1332#       cd $(INSTALLDIR)/usr/sbin && ln -sf httpd httpsclient
1333
1334cert:
1335ifeq ($(CONFIG_CARLSONWIRELESS),y)
1336        ./gencert_carlsonwireless.sh
1337else
1338ifeq ($(CONFIG_ONNET),y)
1339        ./gencert_onnet.sh
1340else
1341ifeq ($(CONFIG_IPR),y)
1342        ./gencert_ipr.sh
1343else
1344        ./gencert.sh
1345endif
1346endif
1347endif
1348       
1349httpd: cgi.o ej.o httpd.o base.o \
1350       $(ADDOBJ) nvramsr.o callvalidate.o $(OBJS)
1351#       gcc -o write_web write_web.c
1352#       ./write_web www
1353        $(CC) -o $@ $^ $(CFLAGS) $(SSLCFLAGS) $(SSLLDFLAGS) $(LDFLAGS)
1354#       ar arc -o $@ $^
1355        rm -f ../rc/rc
1356
1357validate.so: validators.o webs.o wepkey.o setupassist.o aoss_save.o wps.o $(WEBSOBJS) $(REGOBJS)
1358        $(CC) --shared -o $@ $^ $(CFLAGS) -DVALIDSOURCE -DGETREGCODE $(LDFLAGS)
1359
1360visuals.so: dd-wrt.o lib.o ejs.o wireless.o getservice.o ddns.o index.o status.o filters.o forward.o static_route.o dynamic_route.o log.o dhcp.o diag.o find_pattern.o setupassistant.o gps.o aoss.o ejwps.o fs_common.o minidlna.o samba3.o status_gpio.o eoptunnel.o $(VISOBJS) $(REGOBJS2)
1361ifeq ($(CONFIG_MADWIFI_MIMO),y)
1362        $(CC) --shared -c -o $(NVISOBJS) $(NVISFILES) $(NCFLAGS) -DVISUALSOURCE $(LDFLAGS)
1363endif
1364ifeq ($(CONFIG_ATH9K),y)
1365        $(CC) --shared -c -o $(ATH9KVISOBJS) $(ATH9KVISFILES) $(CFLAGS) -DVISUALSOURCE $(LDFLAGS)
1366endif
1367        $(CC) --shared -o $@ $^ $(NVISOBJS) $(ATH9KVISOBJS) $(CFLAGS) -DVISUALSOURCE $(LDFLAGS)
1368       
1369       
1370build_date.o: build_date.c
1371build_date:
1372        echo "#define BUILD_DATE \"`date \"+%b %d %Y\"`\"" > build_date.c
1373        echo "#define BUILD_TIME \"`date \"+%H:%M:%S\"`\"" >> build_date.c
1374
1375
1376*.o: $(CY_DEPS)
Note: See TracBrowser for help on using the repository browser.