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