switch4g: completely re-writen
[tomato.git] / release / src / router / vlan / Makefile
blob40c522c7b015d7aa396d0af4b5ad9a9daa6c7088
1 # makefile template
3 #include MakeInclude
5 CROSS =
6 CC = $(CROSS)gcc
7 AR = $(CROSS)ar
8 STRIP = $(CROSS)strip
9 #DOSTATIC = true
11 ifeq ($(PLATFORM),ppc)
12 CCFLAGS = -g -D_GNU_SOURCE -Wall -I../../linuxppc/linux-2.4.19-rc3/include
13 else
14 CCFLAGS = -g -D_GNU_SOURCE -Wall -I../../linux/linux/include #-mips32
15 endif
16 CCFLAGS += $(EXTRACFLAGS)
18 ifeq ($(strip $(DOSTATIC)),true)
19 LDFLAGS += --static
20 endif
23 LDLIBS =
25 VLAN_OBJS = vconfig.o
27 ALL_OBJS = ${VLAN_OBJS}
29 VCONFIG = vconfig #program to be created
32 all: ${VCONFIG}
35 #This is pretty silly..
36 vconfig.h: Makefile
37 touch vconfig.h
40 $(VCONFIG): $(VLAN_OBJS)
41 $(CC) $(CCFLAGS) $(LDFLAGS) -o $(VCONFIG) $(VLAN_OBJS) $(LDLIBS)
42 $(STRIP) $(VCONFIG)
45 install: $(VCONFIG)
46 install -d $(INSTALLDIR)/vlan/usr/sbin
47 install -m 755 vconfig $(INSTALLDIR)/vlan/usr/sbin
48 $(STRIP) $(INSTALLDIR)/vlan/usr/sbin/vconfig
50 $(ALL_OBJS): %.o: %.c %.h
51 @echo " "
52 @echo "Making $<"
53 $(CC) $(CCFLAGS) -c $<
55 clean:
56 rm -f *.o $(VCONFIG)
58 purge: clean
59 rm -f *.flc ${VCONFIG} vconfig.h
60 rm -f *~