add initial support for the crisarchitecture used on foxboards to openwrt
[openwrt/staging/chunkeey.git] / target / linux / etrax-2.6 / image / e100boot / src / Makefile
1 #
2 # Top Makefile for e100boot
3 # $Id: Makefile,v 1.20 2003/06/04 12:22:23 pkj Exp $
4 #
5
6 # Change these paths if necessary. Can also be specified on cmdline as
7 # 'make INSTALL_PATH=/foo/bar/'.
8
9 INSTALL_NAME = e100boot
10 INSTALL_PATH = /usr/local
11 INSTALL_PATH_BIN = $(INSTALL_PATH)/bin
12 INSTALL_PATH_DOC = $(INSTALL_PATH)/man/man1
13
14 DIRS = libpcap-0.4 sbl doc
15
16 -include $(AXIS_TOP_DIR)/tools/build/Rules.axis
17 ifdef prefix
18 INSTALL_PATH = $(prefix)
19 endif
20
21 INSTALL ?= install
22
23 all: conf $(DIRS)
24 @for d in $(DIRS); do \
25 echo -e "\n### Making $$d"; \
26 $(MAKE) -C $$d || exit; \
27 done
28
29 conf: $(DIRS)
30 @for d in $(DIRS); do \
31 if [ -x $$d/configure ] && [ ! -e $$d/Makefile ]; then \
32 echo -e "\n### Configuring $$d"; \
33 cd $$d; ./configure || exit; cd ..; \
34 fi; \
35 done
36
37 tar: clean
38 @echo -e "\n### Making tarball."
39 tar -C ../ -zcf e100boot.tgz --exclude e100boot.tgz --exclude RCS --exclude CVS e100boot
40
41
42 install: all
43 $(INSTALL) -d $(INSTALL_PATH_BIN) $(INSTALL_PATH_DOC)
44 $(INSTALL) sbl/e100boot.stripped $(INSTALL_PATH_BIN)/$(INSTALL_NAME)
45 $(INSTALL) -m 0644 doc/e100boot.1 $(INSTALL_PATH_DOC)/$(INSTALL_NAME).1
46
47 install.setuid:
48 @echo -e "\n### Make install.setuid"; \
49 if ! [ -e $(INSTALL_PATH_BIN)/$(INSTALL_NAME) ]; then \
50 echo -e "\n### Binary $(INSTALL_PATH_BIN)/$(INSTALL_NAME) does not exist! Make install first."; \
51 elif [ `id -u` = 0 ]; then \
52 chown root.root $(INSTALL_PATH_BIN)/$(INSTALL_NAME); \
53 chmod +s $(INSTALL_PATH_BIN)/$(INSTALL_NAME); \
54 else \
55 echo "### You must do this as root!"; \
56 fi
57
58 clean:
59 @for d in $(DIRS); do \
60 if [ -e $$d/Makefile ]; then \
61 echo -e "\n### Cleaning $$d"; \
62 $(MAKE) -C $$d clean || exit; \
63 fi; \
64 done
65
66 configsubs: conf configsubs-dirs
67
68 configsubs-dirs:
69 $(MAKE) -C libpcap-0.4 configsubs
70 $(MAKE) -C sbl configsubs