]> diplodocus.org Git - nmh/blob - docs/historical/mh-6.8.5/conf/makefiles/config
Silence more gcc format-string warnings.
[nmh] / docs / historical / mh-6.8.5 / conf / makefiles / config
1 ##############################################################################
2 # Instructions to Make, for compilation of MH modules
3 #
4 # @(MHWARNING)
5 # @(#)$Id: config,v 2.8 1992/02/05 21:52:46 jromine Exp $
6 ##############################################################################
7
8 OPTIONS = @(MHOPTIONS)
9 LDOPTIONS= @(LDOPTIONS)
10
11 CC = @(MHCOMPILER)
12 @BEGIN: OPTIM
13 CFLAGS = $(OPTIONS)
14 @END: OPTIM
15 @BEGIN: DEBUG
16 CFLAGS = $(OPTIONS)
17 @END: DEBUG
18 LDFLAGS = $(LDOPTIONS)
19 LIBES =
20 LINT = lint
21 LFLAGS = -bhu $(OPTIONS)
22 LLIBS =
23
24
25 ##############################################################################
26 # Generate object file for MH configuration
27 ##############################################################################
28
29 CFILES = config.c version.c
30 OFILES = config.o version.o
31
32 all: $(OFILES)
33
34 lint:; $(LINT) $(LFLAGS) $(CFILES) $(LLIBS)
35
36 version version.c: true
37 @/bin/sh version.sh @(MHHOSTVER) @(MHRELEASE)
38
39 true:;
40
41 ##############################################################################
42 # Miscellaneous tasks
43 ##############################################################################
44
45 unconfig: distribution
46 -rm -f Makefile
47
48 distribution: clean
49 -rm -f config.c version.c version
50
51 clean: unclean
52 -rm -f *.o
53
54 unclean:; -rm -f _* :* core eddep makedep
55
56
57 ##############################################################################
58 # Dependencies
59 ##############################################################################
60
61 MODULES = $(CFILES)
62
63 depend:; for m in $(MODULES); do ( \
64 i=`basename $$m .c`; \
65 echo $$i.o: $$i.c >> makedep; \
66 grep '^#[ ]*include' $$i.c | \
67 sed -e 's,[^"]*"/\([^"]*\)".*,'$$i'.o: /\1,' \
68 -e 's,[^"]*"\([^"]*\)".*,'$$i'.o: \1,' \
69 -e 's,[^<]*<\(.*\)>.*,#'$$i'.o: /usr/include/\1,' \
70 >> makedep \
71 ); done
72 echo '/^# DO NOT DELETE THIS LINE/+2,$$d' > eddep
73 echo '$$r makedep' >> eddep
74 echo 'w' >> eddep
75 cp Makefile _Makefile
76 ed - Makefile < eddep
77 rm eddep makedep
78 echo '# DEPENDENCIES MUST END AT END OF FILE' >> Makefile
79 echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY' >> Makefile
80
81 # DO NOT DELETE THIS LINE
82 # DEPENDENCIES START HERE
83 config.o: config.c
84 config.o: ../h/mh.h
85 #config.o: /usr/include/pwd.h
86 #config.o: /usr/include/stdio.h
87 # DEPENDENCIES MUST END AT END OF FILE
88 # IF YOU PUT STUFF HERE IT WILL GO AWAY