1include ../common.mak
2
3#CROSS =
4#CC = $(CROSS)gcc
5#AR = $(CROSS)ar
6#STRIP = $(CROSS)strip
7
8ALL_OBJS = igmprt.o proxy.o igmpv2.o util.o filter.o
9
10CCFLAGS += -DHND_FIX -Wall -I$(SRCBASE)/include -I$(TOP)/shared -s -Os -fomit-frame-pointer
11ifeq (2_6_36,$(LINUX_VERSION))
12CCFLAGS += -I$(SRCBASE)/common/include
13endif
14LDFLAGS += -Wl,-allow-shlib-undefined 
15LDFLAGS += -L$(TOP)/netconf -L$(INSTALLDIR)/netconf/usr/lib -lnetconf
16
17ifeq ($(LINUX_VERSION),2_6_36)
18CCFLAGS += -DLINUX_2_6_36
19endif
20
21ifneq ($(wildcard ./prebuilt),)
22all:
23	-cp prebuilt/igmp igmp
24else
25all: igmp
26endif
27
28igmp: $(ALL_OBJS)
29	$(CC) $(CCFLAGS) $(LDFLAGS) -o $@ $(ALL_OBJS) $(LDLIBS)
30	$(STRIP) $@
31
32$(ALL_OBJS): %.o: %.c
33	@echo " "
34	@echo "Making $<"
35	$(CC) $(CCFLAGS) -c $<
36
37install: all
38	install -d $(INSTALLDIR)/igmp/usr/sbin
39	install -m 755 igmp $(INSTALLDIR)/igmp/usr/sbin
40
41.PHONY:	clean
42clean:
43	-rm -f *.o *~ core igmp
44