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