-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
53 lines (45 loc) · 1.16 KB
/
Makefile
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
#
# this is just a top-level makefile to build the simulator
#
# Makefile
# Changed: <2023-07-05 23:17:23 curt>
#
# to build this, we have some prerequsites:
# bison, lib32ncurses-dev
all: sim filesystem
cd src ; make
sim:
ln -s src/usersim/sim sim
src/usersim/sim src/tools/readall:
cd src ; make
test: filesystem src/usersim/sim
src/usersim/sim
DISKS = $(shell cat disks/dist/MICRONIX | grep -v ^# | cut -f 1)
DISKS1 = $(shell cat disks/dist/NEWER | grep -v ^# | cut -f 1)
filesystem: src/tools/readall
for i in $(DISKS) ; do \
src/tools/readall -d filesystem disks/dist/$$i ; \
done
mkdir -p filesystem/newer
for i in $(DISKS1) ; do \
src/tools/readall -d filesystem/newer disks/dist/$$i ; \
done
mkdir -p filesystem/usr/src/sys filesystem/usr/src/cmd
cp src/micronix/*akefile filesystem/usr/src
for i in cmd include sys lib ; do \
cp -r src/micronix/$$i filesystem/usr/src ; \
done
mkdir -p filesystem/old
echo "path /bin /usr/bin" > filesystem/.sh
clean:
for dir in src ; do \
(cd $$dir ; make clean) \
done
clobber:
for dir in src ; do \
(cd $$dir ; make clobber) \
done
rm -rf filesystem sim
rebuildfs:
rm -rf filesystem
$(MAKE) filesystem