]> andersk Git - moira.git/blob - gdb/Makefile
Initial revision
[moira.git] / gdb / Makefile
1 #
2 #       $Source$
3 #       $Header$
4 #
5
6 #       $Source$
7 #       $Author$
8 #       $Header$
9 #
10 # Revised makefile for GDB library.
11 #
12
13 GDBCSRCS= gdb_struct.c gdb_stype.c gdb.c gdb_trans.c gdb_trans2.c \
14         gdb_conn.c gdb_serv.c gdb_fserv.c gdb_db.c gdb_debug.c gdb_ops.c
15
16 GDBNONCSRCS= gdb.h gdb_lib.h dbserv.qc 
17
18 OTHERSRCS= test.c samp1a.c \
19         tst.c tst2.c tcl.c tdbcl.c  tsr.c tfsr.c\
20         tst3.c tst4.c  tst5.c tst6.c 
21
22 LIBOBJS = gdb.o gdb_struct.o gdb_stype.o gdb_trans.o gdb_trans2.o \
23         gdb_conn.o gdb_ops.o gdb_serv.o gdb_fserv.o gdb_db.o gdb_debug.o
24
25 DOCS= library.mss gdb.mss gdb.prob gdb_ugd.mss slides.mss
26
27 SAMPLES= samp1.c 
28
29 MISC= Makefile .saberinit README gdb_version
30
31 CFLAGS= -O
32
33 CCPROF= ${CC}
34
35 FTP= /mit/ftp/gdb
36
37 INGLIBS= /usr/rtingres/lib/libqlib /usr/rtingres/lib/compatlib
38
39 .c.o:
40         ${CCPROF} -c -pg ${CFLAGS} $*.c
41         mv $*.o profiled/$*.o
42         ${CC} -c ${CFLAGS} $*.c
43
44 OPTS=
45
46 all: libgdb.a libgdb_p.a
47
48 libgdb.a: ${LIBOBJS}
49         ar uv libgdb.a ${LIBOBJS}; ranlib libgdb.a
50
51 libgdb_p.a: ${LIBOBJS}
52         (cd profiled; ar uv ../libgdb_p.a ${LIBOBJS}; ranlib ../libgdb_p.a)
53
54 lint:
55         lint -huv ${GDBCSRCS} | \
56         egrep -v "warning: possible pointer alignment problem"
57 #
58 # Random demo programs
59 #
60 tst: tst.o libgdb.a 
61         cc ${OPTS} -o tst tst.o libgdb.a
62
63 stest: stest.o  libgdb.a 
64         cc ${OPTS} -o stest stest.o libgdb.a
65
66 tst2: tst2.o  libgdb.a 
67         cc ${OPTS} -o tst2 tst2.o libgdb.a
68
69 tst3: tst3.o  libgdb.a 
70         cc ${OPTS} -o tst3 tst3.o libgdb.a
71
72 tst4: tst4.o  libgdb.a 
73         cc ${OPTS} -o tst4 tst4.o  libgdb.a
74
75 tst5: tst5.o  libgdb.a 
76         cc ${OPTS} -o tst5 tst5.o  libgdb.a
77
78 tst6: tst6.o  libgdb.a 
79         cc ${OPTS} -o tst6 tst6.o  libgdb.a
80
81 tsr: tsr.o  libgdb.a 
82         cc ${OPTS} -o tsr tsr.o  libgdb.a
83
84 tfsr: tfsr.o  libgdb.a 
85         cc ${OPTS} -o tfsr tfsr.o  libgdb.a
86
87 tcl: tcl.o  libgdb.a 
88         cc ${OPTS} -o tcl tcl.o  libgdb.a
89
90 tdbcl: tdbcl.o  libgdb.a 
91         cc ${OPTS} -o tdbcl tdbcl.o  libgdb.a
92
93 samp1a: samp1a.o  libgdb.a 
94         cc ${OPTS} -o samp1a samp1a.o  libgdb.a
95         
96 dbserv: dbserv.o  libgdb.a 
97         cc ${OPTS} -o dbserv dbserv.o libgdb.a ${INGLIBS} -lm
98         chmod 6755 dbserv
99
100 dbserv.c: dbserv.qc 
101         eqc -d -fdbserv.c dbserv.qc
102
103 #
104 #       Documentation.
105 #
106
107 slides.PS: slides.mss
108         scribe slides
109
110 gdb_ugd.PS: gdb_ugd.mss
111         scribe gdb_ugd
112
113 library.PS: library.mss
114         scribe library
115
116 ugdprint:  gdb_ugd.PS
117         lpr  -Pln03-bldge40-4 gdb_ugd.PS
118         echo 'GDB User Guide sent to PostScript printer'
119
120 libraryprint:  library.PS
121         lpr  -Pln03-bldge40-4 library.PS
122         echo 'GDB Library Reference Manual sent to PostScript printer'
123
124 slideprint:  slides.PS
125         lpr  -Pln03-bldge40-4 slides.PS
126         echo 'GDB slides sent to PostScript printer'
127
128 #
129 # Distribution.
130 #
131
132 tar.file: ${GDBCSRCS} ${GDBNONCSRCS} ${OTHERSRCS} ${DOCS} ${SAMPLES} ${MISC}
133         rm -f tar.file
134         tar cvf tar.file ${GDBCSRCS} ${GDBNONCSRCS} ${OTHERSRCS} \
135                 ${DOCS} ${SAMPLES} ${MISC}
136         chmod 644 tar.file
137
138 archive: tar.file
139         rcp tar.file "menelaus:~noah/gdb/tar.file"
140
141 ftp: tar.file
142         rm -f ${FTP}/tar.file.Z ${FTP}/README
143         compress -c tar.file > ${FTP}/tar.file.Z
144         cp README ${FTP}/README
145         chmod 755 ${FTP}/tar.file.Z ${FTP}/README
146
147
148 # Cleanup.
149 #
150
151 clean:
152         rm -f *.o libgdb.a tar.file *.PS *.err \#* *~ profiled/*.o
153
154 depend: $(CFILES)
155         $(CC) -M $(CFLAGS) $(CFILES) | \
156         sed -e 's; ./; ;' \
157             -e ':loop' \
158             -e 's/\.\.\/[^ /]*\/\.\./../' \
159             -e 't loop' | \
160         awk ' { if ($$1 != prev) { print rec; rec = $$0; prev = $$1; } \
161                 else { if (length(rec $$2) > 78) { print rec; rec = $$0; } \
162                        else rec = rec " " $$2 } } \
163               END { print rec } ' > makedep
164         echo '/^# DO NOT DELETE THIS LINE/+1,$$d' >eddep
165         echo '$$r makedep' >>eddep
166         echo 'w' >>eddep
167         cp Makefile Makefile.bak
168         ed - Makefile < eddep
169         rm eddep makedep
170 #
171 # the last constant line in the makefile should be...
172 # DO NOT DELETE THIS LINE
173
174
175
This page took 0.065332 seconds and 5 git commands to generate.