source: src/router/httpd/Makefile @ 31689

Last change on this file since 31689 was 31689, checked in by brainslayer, 13 days ago

increase nvram size for wdr4900

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_WDR4900),y)
561CFLAGS += -DHAVE_WDR4900
562endif
563ifeq ($(CONFIG_CPUTEMP),y)
564CFLAGS += -DHAVE_CPUTEMP
565endif
566ifeq ($(CONFIG_RADIUSPLUGIN),y)
567CFLAGS += -DHAVE_RADIUSPLUGIN
568endif
569ifeq ($(CONFIG_FONERA),y)
570CFLAGS += -DHAVE_FONERA
571endif
572ifeq ($(CONFIG_ALPHA),y)
573CFLAGS += -DHAVE_ALPHA
574endif
575ifeq ($(CONFIG_WIL6210),y)
576  CFLAGS += -DHAVE_WIL6210
577endif
578ifeq ($(CONFIG_ALPINE),y)
579CFLAGS += -DHAVE_ALPINE
580endif
581ifeq ($(CONFIG_EOC2610),y)
582CFLAGS += -DHAVE_EOC2610
583endif
584ifeq ($(CONFIG_EOC1650),y)
585CFLAGS += -DHAVE_EOC1650
586endif
587ifeq ($(CONFIG_ALLNETWRT),y)
588CFLAGS += -DHAVE_ALLNETWRT
589endif
590ifeq ($(CONFIG_FONERA2200),y)
591CFLAGS += -DHAVE_FONERA2200
592endif
593ifeq ($(CONFIG_DIR400),y)
594CFLAGS += -DHAVE_DIR400
595endif
596ifeq ($(CONFIG_DIR825),y)
597  CFLAGS += -DHAVE_DIR825
598endif
599ifeq ($(CONFIG_XR4SPECIAL),y)
600CFLAGS += -DHAVE_XR4SPECIAL
601endif
602ifeq ($(CONFIG_DIR300),y)
603CFLAGS += -DHAVE_DIR300
604endif
605ifeq ($(CONFIG_USR5453),y)
606CFLAGS += -DHAVE_USR5453
607endif
608ifeq ($(CONFIG_MR3202A),y)
609CFLAGS += -DHAVE_MR3202A
610endif
611ifeq ($(CONFIG_WRK54G),y)
612CFLAGS += -DHAVE_WRK54G
613endif
614ifeq ($(CONFIG_MERAKI),y)
615CFLAGS += -DHAVE_MERAKI
616endif
617ifeq ($(CONFIG_LS2),y)
618CFLAGS += -DHAVE_LS2
619endif
620ifeq ($(CONFIG_WP543),y)
621  CFLAGS += -DHAVE_WP543
622endif
623ifeq ($(CONFIG_WP546),y)
624  CFLAGS += -DHAVE_WP546
625endif
626ifeq ($(CONFIG_NS2),y)
627CFLAGS += -DHAVE_NS2
628endif
629ifeq ($(CONFIG_LC2),y)
630CFLAGS += -DHAVE_LC2
631endif
632ifeq ($(CONFIG_LC5),y)
633CFLAGS += -DHAVE_LC5
634endif
635ifeq ($(CONFIG_NS5),y)
636CFLAGS += -DHAVE_NS5
637endif
638ifeq ($(CONFIG_EOC5610),y)
639CFLAGS += -DHAVE_EOC5610
640endif
641ifeq ($(CONFIG_LS5),y)
642CFLAGS += -DHAVE_LS5
643endif
644ifeq ($(CONFIG_WHRAG108),y)
645CFLAGS += -DHAVE_WHRAG108
646endif
647ifeq ($(CONFIG_TW6600),y)
648CFLAGS += -DHAVE_TW6600
649endif
650ifeq ($(CONFIG_CA8),y)
651CFLAGS += -DHAVE_CA8
652endif
653ifeq ($(CONFIG_CA8PRO),y)
654CFLAGS += -DHAVE_CA8PRO
655endif
656ifeq ($(CONFIG_NOP8670),y)
657CFLAGS += -DHAVE_NOP8670
658CFLAGS += -DHAVE_GATEWORX
659else
660ifeq ($(CONFIG_TONZE),y)
661CFLAGS += -DHAVE_TONZE
662endif
663ifeq ($(CONFIG_WG302),y)
664CFLAGS += -DHAVE_WG302
665endif
666ifeq ($(CONFIG_DSL_CPE_CONTROL),y)
667CFLAGS += -DHAVE_DSL_CPE_CONTROL
668endif
669
670ifeq ($(CONFIG_GATEWORX),y)
671CFLAGS += -DHAVE_GATEWORX
672ifneq ($(CONFIG_WRT300NV2),y)
673ifneq ($(CONFIG_WG302),y)
674CFLAGS += -DHAVE_CPUTEMP
675CFLAGS += -DHAVE_VOLT
676endif
677endif
678endif
679endif
680
681ifeq ($(REGDOMAIN_OVERRIDE),y)
682CFLAGS += -DREGDOMAIN_OVERRIDE
683endif
684
685ifeq ($(CONFIG_34TELECOM),y)
686CFLAGS += -DHAVE_34TELECOM
687endif
688ifeq ($(CONFIG_VLANTAGGING),y)
689CFLAGS += -DHAVE_VLANTAGGING
690endif
691#ifeq ($(CONFIG_MDHCP),y)
692CFLAGS += -DHAVE_MDHCP
693#endif
694
695ifeq ($(CONFIG_DDLAN),y)
696CFLAGS += -DHAVE_DDLAN
697endif
698
699ifeq ($(CONFIG_CORENET),y)
700CFLAGS += -DHAVE_CORENET
701endif
702ifeq ($(CONFIG_XIOCOM),y)
703CFLAGS += -DHAVE_XIOCOM
704endif
705
706ifeq ($(CONFIG_GGEW),y)
707CFLAGS += -DHAVE_GGEW
708endif
709ifeq ($(CONFIG_TELCOM),y)
710CFLAGS += -DHAVE_TELCOM
711endif
712ifeq ($(CONFIG_MYNETWAY),y)
713  CFLAGS += -DHAVE_MYNETWAY
714endif
715
716
717ifeq ($(CONFIG_PPPOE),y)
718CFLAGS += -DHAVE_PPPOE
719CFLAGS += -DHAVE_PPPOEDUAL
720endif
721ifeq ($(CONFIG_PPPOATM),y)
722CFLAGS += -DHAVE_PPPOATM
723endif
724ifeq ($(CONFIG_MODEMBRIDGE),y)
725CFLAGS += -DHAVE_MODEMBRIDGE
726endif
727ifeq ($(CONFIG_WMBR_G300NH),y)
728CFLAGS += -DHAVE_WMBR_G300NH
729endif
730
731ifeq ($(CONFIG_CTORRENT),y)
732CFLAGS += -DHAVE_CTORRENT
733endif
734
735ifeq ($(CONFIG_PWC),y)
736CFLAGS += -DHAVE_PWC
737endif
738
739ifeq ($(CONFIG_UPNP),y)
740CFLAGS += -DHAVE_UPNP
741endif
742
743ifeq ($(CONFIG_RFLOW),y)
744CFLAGS += -DHAVE_RFLOW
745endif
746
747ifeq ($(CONFIG_BIRD),y)
748CFLAGS += -DHAVE_BIRD
749endif
750ifeq ($(CONFIG_QUAGGA),y)
751CFLAGS += -DHAVE_QUAGGA
752endif
753ifeq ($(CONFIG_PPTP),y)
754CFLAGS += -DHAVE_PPTP
755endif
756ifeq ($(CONFIG_PPTPD),y)
757CFLAGS += -DHAVE_PPTPD
758VISOBJS += pptp.o
759endif
760ifeq ($(CONFIG_L2TP),y)
761CFLAGS += -DHAVE_L2TP
762endif
763ifeq ($(CONFIG_HEARTBEAT),y)
764CFLAGS += -DHAVE_HEARTBEAT
765endif
766ifeq ($(CONFIG_EOP_TUNNEL),y)
767CFLAGS += -DHAVE_EOP_TUNNEL
768endif
769ifeq ($(CONFIG_CHILLILOCAL),y)
770CFLAGS += -DHAVE_CHILLILOCAL
771endif
772
773ifeq ($(CONFIG_CHILLISPOT),y)
774CFLAGS += -DHAVE_CHILLI
775endif
776ifeq ($(CONFIG_DLM101),y)
777  CFLAGS += -DHAVE_DLM101
778endif
779
780ifeq ($(CONFIG_QTN),y)
781CFLAGS += -DHAVE_QTN  -DRPCOVERRIDE
782endif
783
784
785ifeq ($(CONFIG_FTP),y)
786LDFLAGS += -Wl,-rpath,$(TOP)/jansson/src/.libs
787LDFLAGS +=-L$(TOP)/jansson/src/.libs -ljansson
788CFLAGS += -DHAVE_NAS_SERVER
789endif
790
791ifeq ($(CONFIG_SAMBA3),y)
792LDFLAGS += -Wl,-rpath,$(TOP)/jansson/src/.libs
793LDFLAGS +=-L$(TOP)/jansson/src/.libs -ljansson
794CFLAGS += -DHAVE_NAS_SERVER
795CFLAGS += -DHAVE_SAMBA_SERVER
796endif
797
798ifeq ($(CONFIG_MINIDLNA),y)
799LDFLAGS += -Wl,-rpath,$(TOP)/jansson/src/.libs
800LDFLAGS +=-L$(TOP)/jansson/src/.libs -ljansson
801CFLAGS += -DHAVE_MINIDLNA
802endif
803
804ifeq ($(CONFIG_PRIVOXY),y)
805CFLAGS += -DHAVE_PRIVOXY
806endif
807
808ifeq ($(CONFIG_WEBSERVER),y)
809CFLAGS += -DHAVE_WEBSERVER
810endif
811
812ifeq ($(CONFIG_SPUTNIK_APD),y)
813CFLAGS += -DHAVE_SPUTNIK_APD
814VISOBJS += sputnik.o
815endif
816ifeq ($(CONFIG_USB),y)
817CFLAGS += -DHAVE_USB
818endif
819ifeq ($(CONFIG_DROPBEAR_SSHD),y)
820CFLAGS += -DHAVE_SSHD
821endif
822ifeq ($(CONFIG_REGISTER),y)
823CFLAGS += -DHAVE_REGISTER -DNOMAIN
824#OBJS += crc.o register.c
825REGOBJS = $(TOP)/register/register.c
826REGOBJS2 = $(TOP)/register/register_vis.o
827ifneq ($(CONFIG_DIST),"micro")
828ifneq ($(CONFIG_DIST),"micro-special")
829#REGOBJS2 = $(TOP)/register/register_check.c
830endif
831endif
832endif
833ifeq ($(CONFIG_SUPERCHANNEL),y)
834CFLAGS += -DHAVE_SUPERCHANNEL
835#OBJS += crc.o register.c
836REGOBJS = $(TOP)/register/register.c
837REGOBJS2 = $(TOP)/register/register_vis.o
838endif
839#ifeq ($(HSIAB_SUPPORT),1)
840#CFLAGS += -I$(TOP)/hsiab
841#LDFLAGS += -L$(TOP)/openssl -L$(TOP)/hsiab -lcrypto -lssl -lhsiab
842#OBJS += hsiab.o
843#endif
844#ifeq ($(HTTPS_SUPPORT),1)
845#CFLAGS += -I$(TOP)/openssl/include  -I$(TOP)/openssl/include/openssl
846#LDFLAGS += -L$(TOP)/openssl -L../openssl -lcrypto -lssl
847#endif
848#ifeq ($(BACKUP_RESTORE_SUPPORT),1)
849#OBJS  += $(SRCBASE)/../tools/src/code_header.o backup_restore.o
850#endif
851
852ifeq ($(CONFIG_MASKMAC),y)
853CFLAGS += -DMASKMAC
854CFLAGS += -DFBNFW
855endif
856
857
858ifeq ($(DDM_SUPPORT),1)
859OBJS  += ddm.o
860endif
861
862ifeq ($(CONFIG_ZEROIP),y)
863CFLAGS += -DHAVE_ZEROIP
864endif
865
866ifeq ($(CONFIG_WRT300NV2),y)
867CFLAGS += -DHAVE_WRT300NV2
868endif
869ifeq ($(CONFIG_FON),y)
870CFLAGS += -DHAVE_FON
871endif
872ifeq ($(CONFIG_NORTHSTAR),y)
873CFLAGS += -DHAVE_NORTHSTAR
874endif
875
876ifeq ($(CONFIG_OPENVPN),y)
877CFLAGS += -DHAVE_OPENVPN
878endif
879
880
881ifeq ($(CONFIG_BOESE),y)
882CFLAGS += -DBOESE=1
883endif
884ifeq ($(CONFIG_WILLIAM),y)
885CFLAGS += -DWILLIAM=1
886endif
887ifeq ($(ARCHITECTURE),broadcom)
888ifneq ($(CONFIG_MADWIFI),y)
889VISOBJS += wireless_broadcom.o
890endif
891endif
892ifeq ($(ARCHITECTURE),northstar)
893ifneq ($(CONFIG_MADWIFI),y)
894VISOBJS += wireless_broadcom.o
895endif
896endif
897
898
899
900ifeq ($(CONFIG_MADWIFI_MIMO),y)
901CFLAGS += -DHAVE_MADWIFI -DHAVE_MADWIFI_MIMO -DHAVE_ACK -I../madwifi.dev/madwifi.dev -include ../madwifi.dev/madwifi.dev/include/compat.h -DATH_USE_COMMONHAL
902ifneq ($(ARCHITECTURE),broadcom)
903CFLAGS += -DHAVE_RELAYD
904endif
905NCFLAGS += $(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
906NVISOBJS += wireless_madwifi11n.o
907NVISFILES += visuals/wireless_madwifi11n.c
908endif
909
910ifeq ($(CONFIG_ATH9K),y)
911LDFLAGS += -L$(TOP)/libnl-tiny -lnl-tiny
912ATH9KVISOBJS += wireless_madwifiath9k.o
913ATH9KVISFILES += visuals/wireless_madwifiath9k.c
914endif
915
916
917ifeq ($(CONFIG_MADWIFI),y)
918ifneq ($(ARCHITECTURE),broadcom)
919CFLAGS += -DHAVE_RELAYD
920endif
921ifeq ($(CONFIG_MADWIFI_MIMO),y)
922CFLAGS += -DHAVE_MADWIFI -DHAVE_MADWIFI_MIMO -DHAVE_ACK -I../madwifi.dev/madwifi.dev -include ../madwifi.dev/madwifi.dev/include/compat.h -DATH_USE_COMMONHAL
923VISOBJS += wireless_madwifi.o
924else
925CFLAGS += -DHAVE_MADWIFI -DHAVE_ACK -I../madwifi.dev/madwifi.dev -include ../madwifi.dev/madwifi.dev/include/compat.h
926VISOBJS += wireless_madwifi.o
927endif
928
929#OBJS += ../wireless-tools/libiw.so.29
930endif
931
932ifeq ($(CONFIG_CDEBUG),y)
933CFLAGS += -DCDEBUG
934endif
935
936CFLAGS += -DHAVE_AQOS
937
938ifeq ($(CONFIG_NET_SCH_CODEL),y)
939CFLAGS += -DHAVE_CODEL
940endif
941ifeq ($(CONFIG_NET_SCH_CODEL),m)
942CFLAGS += -DHAVE_CODEL
943endif
944
945ifeq ($(CONFIG_NET_SCH_FQ_CODEL),y)
946CFLAGS += -DHAVE_FQ_CODEL
947endif
948ifeq ($(CONFIG_NET_SCH_FQ_CODEL),m)
949CFLAGS += -DHAVE_FQ_CODEL
950endif
951
952ifeq ($(CONFIG_NET_SCH_PIE),y)
953CFLAGS += -DHAVE_PIE
954endif
955ifeq ($(CONFIG_NET_SCH_PIE),m)
956CFLAGS += -DHAVE_PIE
957endif
958
959ifeq ($(CONFIG_WTS),y)
960CFLAGS += -DHAVE_WTS
961endif
962
963ifeq ($(CONFIG_OMNI),y)
964CFLAGS += -DHAVE_OMNI
965endif
966
967
968ifeq ($(CONFIG_SKYTEL),y)
969CFLAGS += -DHAVE_SKYTEL
970endif
971ifeq ($(CONFIG_BUFFALO),y)
972CFLAGS += -DHAVE_BUFFALO
973endif
974ifeq ($(CONFIG_BUFFALO_SA),y)
975CFLAGS += -DHAVE_BUFFALO_SA
976endif
977ifeq ($(CONFIG_SPOTPASS),y)
978CFLAGS += -DHAVE_SPOTPASS
979endif
980
981ifeq ($(CONFIG_EASY_WIRELESS_CONFIG),y)
982CFLAGS += -DHAVE_EASY_WIRELESS_CONFIG
983endif
984ifeq ($(CONFIG_MADWIFI),y)
985CFLAGS += -DHAVE_EASY_WIRELESS_CONFIG
986endif
987ifeq ($(CONFIG_MADWIFI_MIMO),y)
988CFLAGS += -DHAVE_EASY_WIRELESS_CONFIG
989endif
990ifeq ($(CONFIG_MADWIFI_ATH9K),y)
991CFLAGS += -DHAVE_EASY_WIRELESS_CONFIG
992endif
993
994ifeq ($(CONFIG_IFL),y)
995CFLAGS += -DHAVE_IFL
996endif
997
998ifeq ($(CONFIG_SKYTRON),y)
999CFLAGS += -DHAVE_SKYTRON
1000endif
1001
1002
1003ifeq ($(CONFIG_DLS),y)
1004CFLAGS += -DHAVE_DLS
1005endif
1006
1007ifeq ($(CONFIG_NOTRANS),y)
1008CFLAGS += -DHAVE_NOTRANS
1009endif
1010
1011ifeq ($(CONFIG_MACBIND),y)
1012CFLAGS += -DHAVE_MACBIND
1013endif
1014
1015ifeq ($(CONFIG_POWERNOC),y)
1016CFLAGS += -DHAVE_POWERNOC
1017endif
1018ifeq ($(CONFIG_R2M),y)
1019  CFLAGS += -DHAVE_R2M
1020endif
1021ifeq ($(CONFIG_R5M),y)
1022  CFLAGS += -DHAVE_R5M
1023endif
1024ifeq ($(CONFIG_BS2MHP),y)
1025  CFLAGS += -DHAVE_BS2MHP
1026endif
1027ifeq ($(CONFIG_BS5MHP),y)
1028  CFLAGS += -DHAVE_BS5MHP
1029endif
1030ifeq ($(CONFIG_NS2M),y)
1031  CFLAGS += -DHAVE_NS2M
1032endif
1033ifeq ($(CONFIG_NS5M),y)
1034  CFLAGS += -DHAVE_NS5M
1035endif
1036
1037ifeq ($(CONFIG_FREEBIRD),y)
1038CFLAGS += -DCONFIG_FREEBIRD
1039endif
1040
1041ifeq ($(CONFIG_BRANDING),y)
1042CFLAGS += -DHAVE_BRANDING
1043endif
1044
1045ifeq ($(ARP_TABLE_SUPPORT),1)
1046OBJS  += arp.o
1047endif
1048ifeq ($(CONFIG_UBNTM),y)
1049CFLAGS += -DHAVE_UBNTM
1050endif
1051
1052ifeq ($(EMI_TEST),1)
1053OBJS  += emi_test.o
1054endif
1055ifeq ($(DEBUG_WEB),1)
1056CFLAGS += -DMY_DEBUG
1057endif
1058ifeq ($(CONFIG_WOL),y)
1059CFLAGS += -DHAVE_WOL
1060endif
1061ifeq ($(CONFIG_PB42),y)
1062CFLAGS += -DHAVE_PB42
1063endif
1064ifeq ($(CONFIG_RS),y)
1065CFLAGS += -DHAVE_RS
1066endif
1067ifeq ($(CONFIG_JA76PF),y)
1068  CFLAGS += -DHAVE_JA76PF
1069endif
1070ifeq ($(CONFIG_ALFAAP94),y)
1071  CFLAGS += -DHAVE_ALFAAP94
1072endif
1073ifeq ($(CONFIG_JWAP003),y)
1074  CFLAGS += -DHAVE_JWAP003
1075endif
1076ifeq ($(CONFIG_UNBOUND),y)
1077  CFLAGS += -DHAVE_UNBOUND
1078endif
1079ifeq ($(CONFIG_LSX),y)
1080CFLAGS += -DHAVE_LSX
1081endif
1082ifeq ($(CONFIG_WZRG300NH),y)
1083CFLAGS += -DHAVE_WZRG300NH
1084endif
1085ifeq ($(CONFIG_WHR300HP2),y)
1086CFLAGS += -DHAVE_WHR300HP2
1087endif
1088ifeq ($(CONFIG_WHRHPGN),y)
1089CFLAGS += -DHAVE_WHRHPGN
1090endif
1091ifeq ($(CONFIG_WZR300HP),y)
1092CFLAGS += -DHAVE_WZR300HP
1093endif
1094ifeq ($(CONFIG_WZR600DHP),y)
1095CFLAGS += -DHAVE_WZR600DHP
1096endif
1097ifeq ($(CONFIG_MT7620),y)
1098CFLAGS += -DHAVE_MT7620
1099endif
1100ifeq ($(CONFIG_HORNET),y)
1101CFLAGS += -DHAVE_HORNET
1102endif
1103ifeq ($(CONFIG_WASP),y)
1104CFLAGS += -DHAVE_WASP
1105endif
1106ifeq ($(CONFIG_WR650AC),y)
1107CFLAGS += -DHAVE_WR650AC
1108endif
1109ifeq ($(CONFIG_E355AC),y)
1110CFLAGS += -DHAVE_E355AC
1111endif
1112ifeq ($(CONFIG_E325N),y)
1113CFLAGS += -DHAVE_E325N
1114endif
1115ifeq ($(CONFIG_E380AC),y)
1116CFLAGS += -DHAVE_E380AC
1117endif
1118ifeq ($(CONFIG_DANUBE),y)
1119CFLAGS += -DHAVE_DANUBE
1120endif
1121ifeq ($(CONFIG_STORM),y)
1122CFLAGS += -DHAVE_STORM
1123endif
1124ifeq ($(CONFIG_WBD222),y)
1125  CFLAGS += -DHAVE_WBD222
1126endif
1127ifeq ($(CONFIG_OPENRISC),y)
1128CFLAGS += -DHAVE_OPENRISC
1129endif
1130ifeq ($(CONFIG_WP54G),y)
1131CFLAGS += -DHAVE_WP54G
1132endif
1133ifeq ($(CONFIG_ADM5120),y)
1134CFLAGS += -DHAVE_ADM5120
1135endif
1136ifeq ($(CONFIG_JJAP93),y)
1137CFLAGS += -DHAVE_JJAP93
1138endif
1139ifeq ($(CONFIG_DAP2230),y)
1140CFLAGS += -DHAVE_DAP2230
1141endif
1142ifeq ($(CONFIG_DAP3320),y)
1143CFLAGS += -DHAVE_DAP3320
1144endif
1145ifeq ($(CONFIG_DAP2330),y)
1146CFLAGS += -DHAVE_DAP2330
1147endif
1148ifeq ($(CONFIG_DAP2660),y)
1149CFLAGS += -DHAVE_DAP2660
1150endif
1151ifeq ($(CONFIG_DAP3662),y)
1152  CFLAGS += -DHAVE_DAP3662
1153endif
1154
1155
1156ifeq ($(CONFIG_TIEXTRA1),y)
1157CFLAGS += -DHAVE_TIEXTRA1 -Wl,-rpath,$(TOP)/jansson/src/.libs
1158LDFLAGS +=   -Wl,-rpath,$(TOP)/jansson/src/.libs
1159VISOBJS  += $(TOP)/private/telkom/mchillispotejs.o
1160WEBSOBJS  += $(TOP)/private/telkom/mchillispotvalidate.o
1161endif
1162ifeq ($(CONFIG_TIEXTRA2),y)
1163CFLAGS += -DHAVE_TIEXTRA2 -Wl,-rpath,$(TOP)/jansson/src/.libs
1164LDFLAGS +=   -Wl,-rpath,$(TOP)/jansson/src/.libs
1165VISOBJS  += $(TOP)/private/telkom/mwifidogejs.o
1166WEBSOBJS  += $(TOP)/private/telkom/mwifidogvalidate.o
1167endif
1168
1169ifeq ($(SAMBA_SUPPORT),1)
1170OBJS  += samba.o
1171endif
1172ifeq ($(CONFIG_SAMBA),y)
1173CFLAGS += -DHAVE_SAMBA
1174endif
1175ifeq ($(CONFIG_JFFS2),y)
1176CFLAGS += -DHAVE_JFFS2
1177endif
1178ifeq ($(CONFIG_MMC),y)
1179CFLAGS += -DHAVE_MMC
1180endif
1181#ifeq ($(HW_QOS_SUPPORT),1)
1182#OBJS  += qos.o
1183#endif
1184ifeq ($(PERFORMANCE_SUPPORT),1)
1185OBJS  += performance.o
1186endif
1187#ifeq ($(WL_STA_SUPPORT),1)
1188VISOBJS  += site_survey.o
1189#endif
1190
1191ifeq ($(CONFIG_PPPOESERVER),y)
1192CFLAGS += -DHAVE_PPPOESERVER
1193VISOBJS += chaps.o
1194endif
1195
1196ifeq ($(CONFIG_MILKFISH),y)
1197CFLAGS += -DHAVE_MILKFISH
1198VISOBJS += milkfish.o
1199endif
1200
1201ifeq ($(CONFIG_RT2880),y)
1202  CFLAGS += -DHAVE_RT2880
1203  VISOBJS += wireless_ralink.o
1204endif
1205ifeq ($(CONFIG_RT61),y)
1206  CFLAGS += -DHAVE_RT2880
1207  CFLAGS += -DHAVE_RT61
1208  VISOBJS += wireless_ralink.o
1209endif
1210ifeq ($(CONFIG_RT3052),y)
1211  CFLAGS += -DHAVE_RT2880  -DHAVE_RT3052
1212endif
1213ifeq ($(CONFIG_WHRG300N),y)
1214  CFLAGS += -DHAVE_WHRG300N
1215endif
1216ifeq ($(CONFIG_WR5422),y)
1217  CFLAGS += -DHAVE_WR5422
1218endif
1219ifeq ($(CONFIG_WHRHPGN),y)
1220CFLAGS += -DHAVE_WHRHPGN
1221endif
1222ifeq ($(CONFIG_WHRG300NV2),y)
1223CFLAGS += -DHAVE_WHRG300NV2
1224endif
1225ifeq ($(CONFIG_WHRHPG300N),y)
1226CFLAGS += -DHAVE_WHRHPG300N
1227endif
1228ifeq ($(CONFIG_CUSTOMSSLCERT),y)
1229CFLAGS += -DHAVE_CUSTOMSSLCERT
1230endif
1231
1232
1233
1234#use this do disable number of arguments checking (less code and faster exec)
1235CFLAGS += -DFASTWEB
1236
1237#JSON encoding/decoding
1238CFLAGS += -I$(TOP)/jansson/src
1239
1240#OBJS += http.o
1241
1242ifneq ($(CONFIG_NOSSL),y)
1243ifeq ($(CONFIG_OPENSSL),y)
1244ifeq ($(CONFIG_FREERADIUS),y)
1245CONFIG_MATRIXSSL=n
1246endif
1247ifeq ($(CONFIG_ASTERISK),y)
1248CONFIG_MATRIXSSL=n
1249endif
1250ifeq ($(CONFIG_AIRCRACK),y)
1251CONFIG_MATRIXSSL=n
1252endif
1253ifeq ($(CONFIG_POUND),y)
1254CONFIG_MATRIXSSL=n
1255endif
1256ifeq ($(CONFIG_IPETH),y)
1257CONFIG_MATRIXSSL=n
1258endif
1259ifeq ($(CONFIG_VPNC),y)
1260CONFIG_MATRIXSSL=n
1261endif
1262ifeq ($(CONFIG_TOR),y)
1263CONFIG_MATRIXSSL=n
1264endif
1265endif
1266ifeq ($(CONFIG_POLARSSL),y)
1267CONFIG_MATRIXSSL=n
1268CFLAGS += -I$(TOP)/polarssl/include
1269SSLLDFLAGS += -L$(TOP)/polarssl/library -lpolarssl -lpthread
1270CFLAGS += -DHAVE_POLARSSL
1271CFLAGS += -DHAVE_HTTPS
1272endif
1273
1274ifneq ($(CONFIG_MATRIXSSL),y)
1275ifeq ($(CONFIG_OPENSSL),y)
1276CFLAGS += -I$(TOP)/openssl/include  -I$(TOP)/openssl/include/openssl
1277SSLLDFLAGS += -L$(TOP)/openssl -L$(TOP)/openssl -L$(TOP)/zlib -lssl -lcrypto
1278CFLAGS += -DHAVE_OPENSSL
1279CFLAGS += -DHAVE_HTTPS
1280endif
1281endif
1282
1283
1284ifeq ($(CONFIG_MATRIXSSL),y)
1285#CONFIG_XYSSL=y
1286
1287CFLAGS += -I$(TOP)/matrixssl
1288SSLLDFLAGS += -L$(TOP)/matrixssl/src -lmatrixsslstatic -lpthread
1289CFLAGS += -DHAVE_MATRIXSSL
1290CFLAGS += -DHAVE_HTTPS
1291OBJS += matrixssl_xface.o
1292endif
1293
1294
1295endif
1296
1297#OBJS  += common.o server.o
1298#OBJS  += code_header.o
1299
1300
1301
1302vpath %.c modules modules/special.$(ARCH) $(SRCBASE)/../tools/src validate visuals ../private/buffalo ../private/buffalo/intatstart/httpd/validate ../private/buffalo/intatstart/httpd/visuals
1303
1304
1305all: generate validate.so visuals.so httpd cert
1306
1307generate:
1308        gcc -o gen gen.c
1309        ./gen > webs.h
1310
1311clean:
1312        rm -f *.o *~ httpd
1313        rm -f modules/*.o
1314        rm -f modules/*.*~
1315        rm -f validate/*.*~
1316        rm -f visuals/*.*~
1317        rm -f *.a
1318        #Added by Daniel(2004-07-29)
1319        #cp ../shared/ezc.o ./
1320        #rm -rf $(SRCBASE)/../tools/src/code_header.o   
1321
1322install:
1323#       lzma e www www.lz
1324ifneq ($(CONFIG_LITE),y)
1325        install -D www $(INSTALLDIR)/etc/www
1326        install -D httpd $(INSTALLDIR)/usr/sbin/httpd
1327        mkdir -p $(INSTALLDIR)/usr/lib
1328        install -D validate.so $(INSTALLDIR)/usr/lib
1329        install -D visuals.so $(INSTALLDIR)/usr/lib
1330ifneq ($(CONFIG_NOSSL),y)
1331        install -d $(INSTALLDIR)/etc
1332        install *.pem $(INSTALLDIR)/etc
1333endif
1334endif
1335#       cd $(INSTALLDIR)/usr/sbin && ln -sf httpd httpsclient
1336
1337cert:
1338ifeq ($(CONFIG_CARLSONWIRELESS),y)
1339        ./gencert_carlsonwireless.sh
1340else
1341ifeq ($(CONFIG_ONNET),y)
1342        ./gencert_onnet.sh
1343else
1344ifeq ($(CONFIG_IPR),y)
1345        ./gencert_ipr.sh
1346else
1347        ./gencert.sh
1348endif
1349endif
1350endif
1351       
1352httpd: cgi.o ej.o httpd.o base.o \
1353       $(ADDOBJ) nvramsr.o callvalidate.o $(OBJS)
1354#       gcc -o write_web write_web.c
1355#       ./write_web www
1356        $(CC) -o $@ $^ $(CFLAGS) $(SSLCFLAGS) $(SSLLDFLAGS) $(LDFLAGS)
1357#       ar arc -o $@ $^
1358        rm -f ../rc/rc
1359
1360validate.so: validators.o webs.o wepkey.o setupassist.o aoss_save.o wps.o $(WEBSOBJS) $(REGOBJS)
1361        $(CC) --shared -o $@ $^ $(CFLAGS) -DVALIDSOURCE -DGETREGCODE $(LDFLAGS)
1362
1363visuals.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)
1364ifeq ($(CONFIG_MADWIFI_MIMO),y)
1365        $(CC) --shared -c -o $(NVISOBJS) $(NVISFILES) $(NCFLAGS) -DVISUALSOURCE $(LDFLAGS)
1366endif
1367ifeq ($(CONFIG_ATH9K),y)
1368        $(CC) --shared -c -o $(ATH9KVISOBJS) $(ATH9KVISFILES) $(CFLAGS) -DVISUALSOURCE $(LDFLAGS)
1369endif
1370        $(CC) --shared -o $@ $^ $(NVISOBJS) $(ATH9KVISOBJS) $(CFLAGS) -DVISUALSOURCE $(LDFLAGS)
1371       
1372       
1373build_date.o: build_date.c
1374build_date:
1375        echo "#define BUILD_DATE \"`date \"+%b %d %Y\"`\"" > build_date.c
1376        echo "#define BUILD_TIME \"`date \"+%H:%M:%S\"`\"" >> build_date.c
1377
1378
1379*.o: $(CY_DEPS)
Note: See TracBrowser for help on using the repository browser.