1# $Id: unix.m4,v 1.4 1997/11/04 22:28:19 drh Exp $ 2A=.a 3O=.o 4E= 5CC=cc 6I=include 7CFLAGS=-g -I$I 8LDFLAGS=-g 9LD=cc 10AS=as 11AR=ar ruv 12RANLIB=ranlib 13DIFF=diff 14RM=rm -f 15CUSTOM=custom.mk 16EXTRAS=$(BUILDDIR)/memcmp$O $(BUILDDIR)/memmove$O $(BUILDDIR)/strncmp$O 17THREADS=$(BUILDDIR)/thread$O $(BUILDDIR)/swtch$O 18include $(CUSTOM) 19B=$(BUILDDIR)/ 20 21# $Id: makefile.m4,v 1.4 1997/11/04 22:29:12 drh Exp $ 22OBJS= $Bap$O \ 23 $Barena$O \ 24 $Barith$O \ 25 $Barray$O \ 26 $Bassert$O \ 27 $Batom$O \ 28 $Bbit$O \ 29 $Bchan$O \ 30 $Bexcept$O \ 31 $Bfmt$O \ 32 $Blist$O \ 33 $Bmem$O \ 34 $Bmp$O \ 35 $Bring$O \ 36 $Bseq$O \ 37 $Bset$O \ 38 $Bstack$O \ 39 $Bstr$O \ 40 $Btable$O \ 41 $Btext$O \ 42 $Bxp$O \ 43 $(THREADS) 44 45EXAMPLES= $Bdouble$E \ 46 $Bcalc$E \ 47 $Bids$E \ 48 $Bmpcalc$E \ 49 $Bwf$E \ 50 $Bxref$E \ 51 $Bcref$E \ 52 $Biref$E \ 53 $Bkref$E \ 54 $Bidents$E \ 55 $Bwords$E \ 56 $Bbasename$E \ 57 $Bdirname$E \ 58 59 60 61 62all:: $Blibcii$A $(EXAMPLES) $Bmemchk$O 63 64$Blibcii$A:: $(OBJS) $(EXTRAS) 65 $(AR) $@ $(OBJS) $(EXTRAS); $(RANLIB) $@ || true 66 67$Bap$O: src/ap.c; $(CC) $(CFLAGS) -c -o $@ src/ap.c 68$Barena$O: src/arena.c; $(CC) $(CFLAGS) -c -o $@ src/arena.c 69$Barith$O: src/arith.c; $(CC) $(CFLAGS) -c -o $@ src/arith.c 70$Barray$O: src/array.c; $(CC) $(CFLAGS) -c -o $@ src/array.c 71$Bassert$O: src/assert.c; $(CC) $(CFLAGS) -c -o $@ src/assert.c 72$Batom$O: src/atom.c; $(CC) $(CFLAGS) -c -o $@ src/atom.c 73$Bbit$O: src/bit.c; $(CC) $(CFLAGS) -c -o $@ src/bit.c 74$Bchan$O: src/chan.c; $(CC) $(CFLAGS) -c -o $@ src/chan.c 75$Bexcept$O: src/except.c; $(CC) $(CFLAGS) -c -o $@ src/except.c 76$Bfmt$O: src/fmt.c; $(CC) $(CFLAGS) -c -o $@ src/fmt.c 77$Blist$O: src/list.c; $(CC) $(CFLAGS) -c -o $@ src/list.c 78$Bmem$O: src/mem.c; $(CC) $(CFLAGS) -c -o $@ src/mem.c 79$Bmemchk$O: src/memchk.c; $(CC) $(CFLAGS) -c -o $@ src/memchk.c 80$Bmp$O: src/mp.c; $(CC) $(CFLAGS) -c -o $@ src/mp.c 81$Bring$O: src/ring.c; $(CC) $(CFLAGS) -c -o $@ src/ring.c 82$Bseq$O: src/seq.c; $(CC) $(CFLAGS) -c -o $@ src/seq.c 83$Bset$O: src/set.c; $(CC) $(CFLAGS) -c -o $@ src/set.c 84$Bstack$O: src/stack.c; $(CC) $(CFLAGS) -c -o $@ src/stack.c 85$Bstr$O: src/str.c; $(CC) $(CFLAGS) -c -o $@ src/str.c 86$Btable$O: src/table.c; $(CC) $(CFLAGS) -c -o $@ src/table.c 87$Btext$O: src/text.c; $(CC) $(CFLAGS) -c -o $@ src/text.c 88$Bthread$O: src/thread.c; $(CC) $(CFLAGS) -c -o $@ src/thread.c 89$Bthread-nt$O: src/thread-nt.c;$(CC) $(CFLAGS) -c -o $@ src/thread-nt.c 90$Bxp$O: src/xp.c; $(CC) $(CFLAGS) -c -o $@ src/xp.c 91$Bswtch$O: src/swtch.s; $(AS) -o $@ src/swtch.s 92 93$Bmemcmp$O: src/memcmp.c; $(CC) $(CFLAGS) -c -o $@ src/memcmp.c 94$Bmemmove$O: src/memmove.c; $(CC) $(CFLAGS) -c -o $@ src/memmove.c 95$Bstrncmp$O: src/strncmp.c; $(CC) $(CFLAGS) -c -o $@ src/strncmp.c 96 97$Bdouble$O: examples/double.c; $(CC) $(CFLAGS) -c -o $@ examples/double.c 98$Bcalc$O: examples/calc.c; $(CC) $(CFLAGS) -c -o $@ examples/calc.c 99$Bids$O: examples/ids.c; $(CC) $(CFLAGS) -c -o $@ examples/ids.c 100$Bmpcalc$O: examples/mpcalc.c; $(CC) $(CFLAGS) -c -o $@ examples/mpcalc.c 101$Biref$O: examples/iref.c; $(CC) $(CFLAGS) -c -o $@ examples/iref.c 102$Bkref$O: examples/kref.c; $(CC) $(CFLAGS) -c -o $@ examples/kref.c 103$Bidents$O: examples/idents.c; $(CC) $(CFLAGS) -c -o $@ examples/idents.c 104$Bwords$O: examples/words.c; $(CC) $(CFLAGS) -c -o $@ examples/words.c 105$Bbasename$O: examples/basename.c; $(CC) $(CFLAGS) -c -o $@ examples/basename.c 106$Bwf$O: examples/wf.c; $(CC) $(CFLAGS) -c -o $@ examples/wf.c 107$Bgetword$O: examples/getword.c; $(CC) $(CFLAGS) -c -o $@ examples/getword.c 108$Bxref$O: examples/xref.c; $(CC) $(CFLAGS) -c -o $@ examples/xref.c 109$Binteger$O: examples/integer.c; $(CC) $(CFLAGS) -c -o $@ examples/integer.c 110$Bcref$O: examples/cref.c; $(CC) $(CFLAGS) -c -o $@ examples/cref.c 111$Bsort$O: examples/sort.c; $(CC) $(CFLAGS) -c -o $@ examples/sort.c 112$Bspin$O: examples/spin.c; $(CC) $(CFLAGS) -c -o $@ examples/spin.c 113$Bsieve$O: examples/sieve.c; $(CC) $(CFLAGS) -c -o $@ examples/sieve.c 114 115$Bwf$O $Bxref$O $Bgetword$O: examples/getword.h 116$Bcref$O $Binteger$O: examples/integer.h 117 118$Bdouble$E: $Bdouble$O $Blibcii$A; $(LD) $(LDFLAGS) -o $@ $Bdouble$O $Blibcii$A 119$Bcalc$E: $Bcalc$O $Blibcii$A; $(LD) $(LDFLAGS) -o $@ $Bcalc$O $Blibcii$A 120$Bids$E: $Bids$O $Blibcii$A; $(LD) $(LDFLAGS) -o $@ $Bids$O $Blibcii$A 121$Bmpcalc$E: $Bmpcalc$O $Blibcii$A; $(LD) $(LDFLAGS) -o $@ $Bmpcalc$O $Blibcii$A 122$Biref$E: $Biref$O $Blibcii$A; $(LD) $(LDFLAGS) -o $@ $Biref$O $Blibcii$A 123$Bkref$E: $Bkref$O $Blibcii$A; $(LD) $(LDFLAGS) -o $@ $Bkref$O $Blibcii$A 124$Bidents$E: $Bidents$O $Blibcii$A; $(LD) $(LDFLAGS) -o $@ $Bidents$O $Blibcii$A 125$Bwords$E: $Bwords$O $Blibcii$A; $(LD) $(LDFLAGS) -o $@ $Bwords$O $Blibcii$A 126$Bbasename$E: $Bbasename$O $Blibcii$A; $(LD) $(LDFLAGS) -o $@ $Bbasename$O $Blibcii$A 127$Bdirname$E: $Bbasename$O $Blibcii$A; $(LD) $(LDFLAGS) -o $@ $Bbasename$O $Blibcii$A 128$Bwf$E: $Bwf$O $Bgetword$O $Blibcii$A; $(LD) $(LDFLAGS) -o $@ $Bwf$O $Bgetword$O $Blibcii$A 129$Bxref$E: $Bxref$O $Bgetword$O $Blibcii$A;$(LD) $(LDFLAGS) -o $@ $Bxref$O $Bgetword$O $Blibcii$A 130$Bcref$E: $Bcref$O $Binteger$O $Blibcii$A;$(LD) $(LDFLAGS) -o $@ $Bcref$O $Binteger$O $Blibcii$A 131: $Bsort$O $Blibcii$A; $(LD) $(LDFLAGS) -o $@ $Bsort$O $Blibcii$A 132: $Bspin$O $Blibcii$A; $(LD) $(LDFLAGS) -o $@ $Bspin$O $Blibcii$A 133: $Bsieve$O $Blibcii$A; $(LD) $(LDFLAGS) -o $@ $Bsieve$O $Blibcii$A 134 135clean:: 136 $(RM) $B*$O 137 $(RM) $(EXAMPLES) 138 139clobber:: clean 140 $(RM) $Blibcii$A 141 142 143 144# DO NOT DELETE THIS LINE -- make depend depends on it. 145 146$Bap$O: $I/assert.h $I/except.h $I/ap.h $I/fmt.h $I/xp.h $I/mem.h 147$Barena$O: $I/assert.h $I/except.h $I/arena.h 148$Barith$O: $I/arith.h 149$Barray$O: $I/assert.h $I/except.h $I/array.h $I/arrayrep.h $I/mem.h 150$Bassert$O: $I/assert.h $I/except.h 151$Batom$O: $I/atom.h $I/assert.h $I/except.h $I/mem.h 152$Bbit$O: $I/assert.h $I/except.h $I/bit.h $I/mem.h 153$Bchan$O: $I/assert.h $I/except.h $I/mem.h $I/chan.h $I/sem.h 154$Bexcept$O: $I/assert.h $I/except.h 155$Bfmt$O: $I/assert.h $I/except.h $I/fmt.h $I/mem.h 156$Blist$O: $I/assert.h $I/except.h $I/mem.h $I/list.h 157$Bmem$O: $I/assert.h $I/except.h $I/mem.h 158$Bmemchk$O: $I/assert.h $I/except.h $I/mem.h 159$Bmp$O: $I/assert.h $I/except.h $I/fmt.h $I/mem.h $I/xp.h $I/mp.h 160$Bring$O: $I/assert.h $I/except.h $I/ring.h $I/mem.h 161$Bseq$O: $I/assert.h $I/except.h $I/seq.h $I/array.h $I/arrayrep.h $I/mem.h 162$Bset$O: $I/mem.h $I/except.h $I/assert.h $I/arith.h $I/set.h 163$Bstack$O: $I/assert.h $I/except.h $I/mem.h $I/stack.h 164$Bstr$O: $I/assert.h $I/except.h $I/fmt.h $I/str.h $I/mem.h 165$Btable$O: $I/mem.h $I/except.h $I/assert.h $I/table.h 166$Btext$O: $I/assert.h $I/except.h $I/fmt.h $I/text.h $I/mem.h 167$Bthread$O: $I/assert.h $I/except.h $I/mem.h $I/thread.h $I/sem.h 168$Bthread-nt$O: $I/assert.h $I/except.h $I/mem.h $I/thread.h $I/sem.h 169$Bxp$O: $I/assert.h $I/except.h $I/xp.h 170