summaryrefslogtreecommitdiff
path: root/libstd/mkfile
blob: 36c6bb2a7fcf7de074e17577b1349068566b68b9 (plain)
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
</$objtype/mkfile

SYSLIB=sys
SYSSRC= \
	sys.myr \
	systypes.myr \
	ifreq.myr \

SYSASMSRC= \
	syscall.s \
	util.s


STDLIB=std
STDSRC= \
	alloc.myr \
	bigint.myr \
	bitset.myr \
	blat.myr \
	chartype.myr \
	cmp.myr \
	dial.myr \
	die.myr \
	dir.myr \
	endian.myr \
	env.myr \
	execvp.myr \
	extremum.myr \
	fltbits.myr \
	fmt.myr \
	fltfmt.myr \
	hashfuncs.myr \
	hasprefix.myr \
	hassuffix.myr \
	htab.myr \
	intparse.myr \
	ipparse.myr \
	mk.myr \
	now.myr \
	option.myr \
	optparse.myr \
	pathjoin.myr \
	rand.myr \
	resolve.myr \
	result.myr \
	search.myr \
	slcp.myr \
	sldup.myr \
	sleq.myr \
	slfill.myr \
	sljoin.myr \
	slpush.myr \
	slput.myr \
	slurp.myr \
	sort.myr \
	spork.myr \
	strfind.myr \
	strjoin.myr \
	strsplit.myr \
	strstrip.myr \
	syswrap.myr \
	swap.myr \
	try.myr \
	types.myr \
	units.myr \
	utf.myr \
	varargs.myr \
	wait.myr \

all:V: lib$STDLIB.a lib$SYSLIB.a

install:V: all
	mkdir -p /$objtype/lib/myr/
	cp lib$STDLIB.a lib$SYSLIB.a /$objtype/lib/myr/
	cp $STDLIB $SYSLIB /$objtype/lib/myr/

lib$STDLIB.a: $STDSRC $ASMSRC lib$SYSLIB.a
	../myrbuild/$O.out -I. -C../6/$O.out -M../muse/$O.out -l $STDLIB $STDSRC $STDASMSRC

lib$SYSLIB.a: $SYSSRC $SYSASMSRC
	../myrbuild/$O.out -C../6/$O.out -M../muse/$O.out -l $SYSLIB $SYSSRC $SYSASMSRC

%.myr: %+plan9-x64.myr
	cp $stem+plan9-x64.myr $stem.myr

%.myr: %+plan9.myr
	cp $stem+plan9.myr $stem.myr

%.myr: %+x64.myr
	cp $stem+x64.myr $stem.myr

%.s: %+plan9-x64.s
	cp $stem+plan9-x64.s $stem.s

%.s: %+x64.s
	cp $stem+x64.s $stem.s

OBJ=${STDSRC:%.myr=%.$O} ${SYSSRC:%.myr=%.$O} ${STDASMSRC:%.s=%.$O} ${SYSASMSRC:%.s=%.$O}
USE=${STDSRC:%.myr=%.use} ${SYSSRC:%.myr=%.use} ${STDLIB}
LIBS=lib$STDLIB.a lib$SYSLIB.a
.PHONY: clean
clean:V:
	rm -f $OBJ
	rm -f $USE
	rm -f $LIBS $STDLIB $SYSLIB

nuke:V: clean