add initial support for the crisarchitecture used on foxboards to openwrt
[openwrt/staging/dedeckeh.git] / target / linux / etrax-2.6 / image / e100boot / src / sbl / Makefile.in
1 #
2 # Makefile for e100boot, sbl side.
3 #
4 # $Id: Makefile.in,v 1.21 2003/11/21 11:38:30 pkj Exp $
5 #
6
7 VPATH := .:../cbl
8
9 CC = @CC@
10
11 AXIS_USABLE_LIBS = UCLIBC GLIBC
12 -include $(AXIS_TOP_DIR)/tools/build/Rules.axis
13
14 CFLAGS += -I. -I../cbl/src @CFLAGS@ -I../libpcap-0.4/ -I../libpcap-0.4/bpf/ -Wall -Wmissing-prototypes -Wno-unused
15 LDFLAGS =
16 LDLIBS = -L../libpcap-0.4/ @LIBS@
17 LDLIBS =
18 LIBPCAP = ../libpcap-0.4/libpcap.a
19
20 IMAGES := ../cbl/net/net.ima ../cbl/net_noleds/net_noleds.ima \
21 ../cbl/ser/ser.ima ../cbl/ser_noleds/ser_noleds.ima
22
23 AUTOSRCS := $(addsuffix .c, $(subst .ima,_ima,$(notdir $(IMAGES))))
24
25 OBJS := common.o network.o serial.o
26 DEPS := $(addprefix deps/, $(subst .o,.d,$(OBJS)))
27
28 STRIP ?= strip
29
30 all: conf.h e100boot e100boot.stripped
31
32 depend: $(DEPS)
33
34 Makefile: Makefile.in
35 @echo -e "\n### New Makefile.in detected, regenerating Makefile..."
36 ./configure
37
38 e100boot: common.o boot_images.o serial.o network.o $(LIBPCAP)
39 @echo -e '\n### Finally... Compiling e100boot.'
40 $(CC) $(LDFLAGS) $^ $(LDLIBS) -o $@
41
42 e100boot.stripped: e100boot
43 cp $< $@
44 $(STRIP) --strip-unneeded $@
45
46 boot_images.o: boot_images.c boot_images.h $(AUTOSRCS)
47 $(CC) -c $(CFLAGS) $< -o $@
48
49 conf.h:
50 ./configure
51
52 reconf:
53 ./configure --cache=/dev/null
54
55 clean:
56 rm -rf e100boot Makefile conf.h config.log config.cache config.status deps *.ima *.o *_ima.c* *~
57
58 $(IMAGES):
59 @echo -e '\n### Making cbl boot images (*.ima)...'
60 $(MAKE) -C ../cbl
61
62 ifneq ($(MAKECMDGOALS),clean)
63 -include $(DEPS)
64 endif
65
66 deps/%.d: %.c
67 @[ -d deps ] || mkdir deps
68 $(CC) -M $(CFLAGS) $< > $@
69
70 deps/%.d: %.S
71 @[ -d deps ] || mkdir deps
72 $(CC) -M $(CFLAGS) $< > $@
73
74 %_ima.c: %.ima
75 @echo -e "### Creating $@ from image $<"
76 @./cconv $*_ima < $< > $@