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