2 # Makefile for e100boot, sbl side.
4 # $Id: Makefile.in,v 1.21 2003/11/21 11:38:30 pkj Exp $
11 AXIS_USABLE_LIBS = UCLIBC GLIBC
12 -include $(AXIS_TOP_DIR)/tools/build/Rules.axis
14 CFLAGS += -I. -I../cbl/src @CFLAGS@ -I../libpcap-0.4/ -I../libpcap-0.4/bpf/ -Wall -Wmissing-prototypes -Wno-unused
16 LDLIBS = -L../libpcap-0.4/ @LIBS@
18 LIBPCAP = ../libpcap-0.4/libpcap.a
20 IMAGES := ../cbl/net/net.ima ../cbl/net_noleds/net_noleds.ima \
21 ../cbl/ser/ser.ima ../cbl/ser_noleds/ser_noleds.ima
23 AUTOSRCS := $(addsuffix .c, $(subst .ima,_ima,$(notdir $(IMAGES))))
25 OBJS := common.o network.o serial.o
26 DEPS := $(addprefix deps/, $(subst .o,.d,$(OBJS)))
30 all: conf.h e100boot e100boot.stripped
35 @echo -e "\n### New Makefile.in detected, regenerating Makefile..."
38 e100boot: common.o boot_images.o serial.o network.o $(LIBPCAP)
39 @echo -e '\n### Finally... Compiling e100boot.'
40 $(CC) $(LDFLAGS) $^ $(LDLIBS) -o $@
42 e100boot.stripped: e100boot
44 $(STRIP) --strip-unneeded $@
46 boot_images.o: boot_images.c boot_images.h $(AUTOSRCS)
47 $(CC) -c $(CFLAGS) $< -o $@
53 ./configure --cache=/dev/null
56 rm -rf e100boot Makefile conf.h config.log config.cache config.status deps *.ima *.o *_ima.c* *~
59 @echo -e '\n### Making cbl boot images (*.ima)...'
62 ifneq ($(MAKECMDGOALS),clean)
67 @[ -d deps ] || mkdir deps
68 $(CC) -M $(CFLAGS) $< > $@
71 @[ -d deps ] || mkdir deps
72 $(CC) -M $(CFLAGS) $< > $@
75 @echo -e "### Creating $@ from image $<"
76 @./cconv $*_ima < $< > $@