Makefile (3167B)
1 # lib9 - unix port from plan9 lib9 2 3 include ../config.mk 4 5 LIB=lib9.a 6 TARG=lib9 7 8 # following objects are not compiled for several reasons 9 # crypt.o 10 # netcrypt.o 11 # convD2M.o 12 # convM2D.o 13 # convM2S.o 14 # convS2M.o 15 16 SECFILES=\ 17 sec/sha1block.o\ 18 sec/sha1.o\ 19 sec/sha1pickle.o\ 20 sec/md5block.o\ 21 sec/md5.o\ 22 sec/md5pickle.o\ 23 24 NUM=\ 25 fmt/charstod.o\ 26 fmt/pow10.o\ 27 28 29 FMTOFILES=\ 30 fmt/dofmt.o\ 31 fmt/fltfmt.o\ 32 fmt/fmt.o\ 33 fmt/fmtfd.o\ 34 fmt/fmtfdflush.o\ 35 fmt/fmtlocale.o\ 36 fmtlock2.o\ 37 fmt/fmtnull.o\ 38 fmt/fmtprint.o\ 39 fmt/fmtquote.o\ 40 fmt/fmtrune.o\ 41 fmt/fmtstr.o\ 42 fmt/fmtvprint.o\ 43 fmt/fprint.o\ 44 fmt/nan64.o\ 45 fmt/print.o\ 46 fmt/runefmtstr.o\ 47 fmt/runeseprint.o\ 48 fmt/runesmprint.o\ 49 fmt/runesnprint.o\ 50 fmt/runesprint.o\ 51 fmt/runevseprint.o\ 52 fmt/runevsmprint.o\ 53 fmt/runevsnprint.o\ 54 fmt/seprint.o\ 55 fmt/smprint.o\ 56 fmt/snprint.o\ 57 fmt/sprint.o\ 58 fmt/strtod.o\ 59 fmt/vfprint.o\ 60 fmt/vseprint.o\ 61 fmt/vsmprint.o\ 62 fmt/vsnprint.o\ 63 $(NUM)\ 64 65 UTFOFILES=\ 66 utf/rune.o\ 67 utf/runestrcat.o\ 68 utf/runestrchr.o\ 69 utf/runestrcmp.o\ 70 utf/runestrcpy.o\ 71 utf/runestrdup.o\ 72 utf/runestrlen.o\ 73 utf/runestrecpy.o\ 74 utf/runestrncat.o\ 75 utf/runestrncmp.o\ 76 utf/runestrncpy.o\ 77 utf/runestrrchr.o\ 78 utf/runestrstr.o\ 79 utf/runetype.o\ 80 utf/utfecpy.o\ 81 utf/utflen.o\ 82 utf/utfnlen.o\ 83 utf/utfrrune.o\ 84 utf/utfrune.o\ 85 utf/utfutf.o\ 86 87 BIOFILES=\ 88 bio/bbuffered.o\ 89 bio/bfildes.o\ 90 bio/bflush.o\ 91 bio/bgetc.o\ 92 bio/bgetrune.o\ 93 bio/bgetd.o\ 94 bio/binit.o\ 95 bio/boffset.o\ 96 bio/bprint.o\ 97 bio/bputc.o\ 98 bio/bputrune.o\ 99 bio/brdline.o\ 100 bio/brdstr.o\ 101 bio/bread.o\ 102 bio/bseek.o\ 103 bio/bvprint.o\ 104 bio/bwrite.o\ 105 106 REGEXFILES=\ 107 regex/regcomp.o\ 108 regex/regerror.o\ 109 regex/regexec.o\ 110 regex/regsub.o\ 111 regex/regaux.o\ 112 regex/rregexec.o\ 113 regex/rregsub.o\ 114 115 LIB9OFILES=\ 116 _exits.o\ 117 _p9dialparse.o\ 118 _p9dir.o\ 119 announce.o\ 120 argv0.o\ 121 atexit.o\ 122 atoi.o\ 123 atol.o\ 124 atoll.o\ 125 atnotify.o\ 126 await.o\ 127 cistrcmp.o\ 128 cistrncmp.o\ 129 cistrstr.o\ 130 cleanname.o\ 131 create.o\ 132 ctime.o\ 133 dial.o\ 134 dirfstat.o\ 135 dirfwstat.o\ 136 dirmodefmt.o\ 137 dirread.o\ 138 dirstat.o\ 139 dirwstat.o\ 140 dup.o\ 141 encodefmt.o\ 142 errstr.o\ 143 exec.o\ 144 execl.o\ 145 exitcode.o\ 146 fcallfmt.o\ 147 get9root.o\ 148 getcallerpc-$(OBJTYPE).o\ 149 getenv.o\ 150 getfields.o\ 151 getnetconn.o\ 152 getns.o\ 153 getuser.o\ 154 getwd.o\ 155 jmp.o\ 156 lrand.o\ 157 lnrand.o\ 158 main.o\ 159 malloc.o\ 160 malloctag.o\ 161 mallocz.o\ 162 nan.o\ 163 needsrcquote.o\ 164 needstack.o\ 165 netmkaddr.o\ 166 notify.o\ 167 nrand.o\ 168 nulldir.o\ 169 open.o\ 170 opentemp.o\ 171 pin.o\ 172 pipe.o\ 173 post9p.o\ 174 postnote.o\ 175 qlock.o\ 176 quote.o\ 177 rand.o\ 178 read9pmsg.o\ 179 readcons.o\ 180 readn.o\ 181 rfork.o\ 182 searchpath.o\ 183 seek.o\ 184 sendfd.o\ 185 sleep.o\ 186 strdup.o\ 187 strecpy.o\ 188 sysfatal.o\ 189 syslog.o\ 190 sysname.o\ 191 time.o\ 192 tm2sec.o\ 193 tokenize.o\ 194 truerand.o\ 195 u16.o\ 196 u32.o\ 197 u64.o\ 198 unsharp.o\ 199 wait.o\ 200 waitpid.o\ 201 write.o\ 202 zoneinfo.o\ 203 204 OFILES=\ 205 $(SECFILES)\ 206 $(FMTOFILES)\ 207 $(UTFOFILES)\ 208 $(BIOFILES)\ 209 $(REGEXFILES)\ 210 $(LIB9OFILES) 211 212 all: ${LIB} 213 @echo built lib9 214 215 install: 216 @mkdir -p ${DESTDIR}${PREFIX}/lib 217 @cp -f ${LIB} ${DESTDIR}${PREFIX}/lib/ 218 219 uninstall: 220 rm -f ${DESTDIR}${PREFIX}/lib/${LIB} 221 222 ${LIB}: ${OFILES} 223 @echo AR ${TARG} 224 @${AR} ${LIB} ${OFILES} 225 226 .c.o: 227 @echo CC $< 228 @${CC} -o $@ ${CFLAGS} -Isec -I${PREFIX}/include $< 229 230 clean: 231 rm -f ${OFILES} ${LIB}