10 # Revised makefile for GDB library.
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
16 GDBNONCSRCS= gdb.h gdb_lib.h dbserv.qc
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
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
25 DOCS= library.mss gdb.mss gdb.prob gdb_ugd.mss slides.mss
29 MISC= Makefile .saberinit README gdb_version
37 INGLIBS= /usr/rtingres/lib/libqlib /usr/rtingres/lib/compatlib
40 ${CCPROF} -c -pg ${CFLAGS} $*.c
42 ${CC} -c ${CFLAGS} $*.c
46 all: libgdb.a libgdb_p.a
49 ar uv libgdb.a ${LIBOBJS}; ranlib libgdb.a
51 libgdb_p.a: ${LIBOBJS}
52 (cd profiled; ar uv ../libgdb_p.a ${LIBOBJS}; ranlib ../libgdb_p.a)
55 lint -huv ${GDBCSRCS} | \
56 egrep -v "warning: possible pointer alignment problem"
58 # Random demo programs
61 cc ${OPTS} -o tst tst.o libgdb.a
63 stest: stest.o libgdb.a
64 cc ${OPTS} -o stest stest.o libgdb.a
67 cc ${OPTS} -o tst2 tst2.o libgdb.a
70 cc ${OPTS} -o tst3 tst3.o libgdb.a
73 cc ${OPTS} -o tst4 tst4.o libgdb.a
76 cc ${OPTS} -o tst5 tst5.o libgdb.a
79 cc ${OPTS} -o tst6 tst6.o libgdb.a
82 cc ${OPTS} -o tsr tsr.o libgdb.a
85 cc ${OPTS} -o tfsr tfsr.o libgdb.a
88 cc ${OPTS} -o tcl tcl.o libgdb.a
90 tdbcl: tdbcl.o libgdb.a
91 cc ${OPTS} -o tdbcl tdbcl.o libgdb.a
93 samp1a: samp1a.o libgdb.a
94 cc ${OPTS} -o samp1a samp1a.o libgdb.a
96 dbserv: dbserv.o libgdb.a
97 cc ${OPTS} -o dbserv dbserv.o libgdb.a ${INGLIBS} -lm
101 eqc -d -fdbserv.c dbserv.qc
107 slides.PS: slides.mss
110 gdb_ugd.PS: gdb_ugd.mss
113 library.PS: library.mss
117 lpr -Pln03-bldge40-4 gdb_ugd.PS
118 echo 'GDB User Guide sent to PostScript printer'
120 libraryprint: library.PS
121 lpr -Pln03-bldge40-4 library.PS
122 echo 'GDB Library Reference Manual sent to PostScript printer'
124 slideprint: slides.PS
125 lpr -Pln03-bldge40-4 slides.PS
126 echo 'GDB slides sent to PostScript printer'
132 tar.file: ${GDBCSRCS} ${GDBNONCSRCS} ${OTHERSRCS} ${DOCS} ${SAMPLES} ${MISC}
134 tar cvf tar.file ${GDBCSRCS} ${GDBNONCSRCS} ${OTHERSRCS} \
135 ${DOCS} ${SAMPLES} ${MISC}
139 rcp tar.file "menelaus:~noah/gdb/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
152 rm -f *.o libgdb.a tar.file *.PS *.err \#* *~ profiled/*.o
155 $(CC) -M $(CFLAGS) $(CFILES) | \
158 -e 's/\.\.\/[^ /]*\/\.\./../' \
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
167 cp Makefile Makefile.bak
168 ed - Makefile < eddep
171 # the last constant line in the makefile should be...
172 # DO NOT DELETE THIS LINE