OSDN Git Service

Fix no pic
[uclinux-h8/uClinux-dist.git] / user / diald / Makefile.org
1 # ------------------ USER CONFIGURABLE SETTINGS ---------------------------
2 # The directories where files will be installed, you may want to change these.
3 # Note that the ETCDIR is where your diald.defs and diald.conf files will be
4 # installed. You should make sure that the path names in config.h match!
5
6 # dctrl goes here
7 BINDIR=/usr/bin
8 # diald goes here
9 SBINDIR=/usr/sbin
10 # the manual page goes here
11 MANDIR=/usr/man
12 # the configuration files go here
13 LIBDIR=/usr/lib/diald
14
15 # Compiler flags. Note that with gcc 2.5.8 using -g without -O
16 # will cause it to miscompile the filter parsing code.
17 # Also note that later versions of gcc may generate bad code
18 # with the -fomit-frame-pointer option.
19 #CFLAGS = -O -g -Wall -fomit-frame-pointer -pipe
20 CFLAGS = -O2 -Wall -pipe
21
22 # If you are using gcc 2.5.8 this will get you QMAGIC executables
23 # later versions of gcc do this by default.
24 #LDFLAGS = -Xlinker -qmagic
25
26
27 #Moderately paranoid CFLAGS (this is moderately useful):
28 #CFLAGS = -Wall -Wtraditional -Wshadow -Wpointer-arith \
29 #       -Wcast-qual -Wcast-align -Wconversion \
30 #        -Wstrict-prototypes -Wnested-externs -Winline \
31 #       -Waggregate-return \
32 #       -O2 -fomit-frame-pointer -pipe
33
34 # Totally paranoid CFLAGS: (Only useful if you like warning messages:-))
35 #CFLAGS = -Wall -Wtraditional -Wshadow -Wpointer-arith \
36 #        -Wbad-function-cast -Wcast-qual -Wcast-align \
37 #        -Wwrite-strings -Wconversion -Waggregate-return \
38 #        -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations \
39 #        -Wredundant-decls -Wnested-externs -Winline \
40 #        -O2 -fomit-frame-pointer -pipe
41
42
43 # ------------------ END OF USER CONFIGURATIONS ---------------------------
44
45 OBJFILES=diald.o options.o modem.o filter.o slip.o lock.o ppp.o dev.o \
46         proxyarp.o fsm.o timer.o firewall.o parse.o buffer.o proxy.o \
47         route.o bufio.o
48 SOURCEFILES=diald.c options.c modem.c filter.c slip.c lock.c ppp.c dev.c \
49         proxyarp.c fsm.c timer.c firewall.c parse.c buffer.c proxy.c route.c \
50         bufio.c bin patches config
51 HFILES=config.h diald.h firewall.h fsm.h version.h timer.h bufio.h
52 DOCFILES=CHANGES README BUGS THANKS LICENSE doc/diald.man doc/diald-faq.txt \
53         doc/dctrl.man doc/diald-examples.man doc/diald-control.man \
54         doc/diald-monitor.man
55 CONTRIBFILES=contrib
56 DISTFILES=Makefile $(SOURCEFILES) $(HFILES) $(DOCFILES) $(CONTRIBFILES)
57
58 diald: $(OBJFILES)
59         $(CC) $(LDFLAGS) -o diald $(OBJFILES)
60
61 install: diald
62         install -o root -g bin bin/dctrl ${BINDIR}/dctrl
63         install -o root -g bin diald ${SBINDIR}/diald
64         install -o root -g bin -m 0644 doc/diald.man ${MANDIR}/man8/diald.8
65         install -o root -g bin -m 0644 doc/dctrl.man ${MANDIR}/man1/dctrl.1
66         install -o root -g bin -m 0644 doc/diald-examples.man ${MANDIR}/man5/diald-examples.5
67         install -o root -g bin -m 0644 doc/diald-control.man ${MANDIR}/man5/diald-control.5
68         install -o root -g bin -m 0644 doc/diald-monitor.man ${MANDIR}/man5/diald-monitor.5
69         -mkdir ${LIBDIR}
70         install -o root -g bin -m 0644 config/diald.defs ${LIBDIR}/diald.defs
71         install -o root -g bin -m 0644 config/standard.filter ${LIBDIR}/standard.filter
72         install -o root -g bin bin/connect ${LIBDIR}/connect
73
74 clean:
75         rm -f *.o diald
76
77 dist: $(DISTFILES)
78         d=diald-`sed -e '/VERSION/!d' -e 's/[^0-9.]*\([0-9.a]*\).*/\1/' -e q version.h` ; \
79         rm -f ../$$d; \
80         ln -s `pwd` ../$$d; \
81         cd ..; \
82         files=""; \
83         for f in $(DISTFILES); do files="$$files $$d/$$f"; done; \
84         tar chof $$d/$$d.tar $$files; \
85         gzip $$d/$$d.tar ; \
86         rm -f $$d
87
88 depend:
89         $(CPP) -M *.c > .depend
90
91 #
92 # include a dependency file if one exists
93 #
94 ifeq (.depend,$(wildcard .depend))
95 include .depend
96 endif