-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
72 lines (57 loc) · 1.58 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
SNAP= 20161212
REL= 20210227
ARC= subc-$(SNAP).tgz
DIST= subc-$(REL).tgz
OS := $(shell uname -s)
ifeq ($(OS),Darwin)
TAROPTS= --no-mac-metadata
endif
SUM= cksum
default:
@echo "Use 'make configure' followed by 'make install' to build and install scc."
configure: clean
./configure
all:
cd src && make all
install: all
cd src && make install
tests: all
cd src && make tests
csums: clean
sort -k 3 _sums > _oldsums
find . -type f | grep -v .git | grep -v .idea | grep -v sums | sort | xargs $(SUM) >_newsums
diff -w _oldsums _newsums || true ; rm _oldsums _newsums
sums: clean
find . -type f | grep -v .git | grep -v .idea | grep -v sums | sort | xargs $(SUM) >_sums
version:
vi src/defs.h Makefile Changes
clean:
cd src && make clean
cd s86 && make clean
rm -f tests/ptest.c $(ARC) $(DIST)
rm -f tests/ptest tests/systest tests/libtest
if [ -f src/Makefile.ORIG ]; then \
mv -f src/Makefile.ORIG src/Makefile; \
fi
arc: clean
tar cvfz $(ARC) *
dist: clean
(cd .. && tar -cvz -f $(DIST) \
--numeric-owner --no-acls $(TAROPTS) \
--exclude .git \
--exclude .gitignore \
--exclude .idea \
--exclude _newsums \
--exclude src/cg.c \
--exclude src/cg.h \
--exclude src/sys.h \
--exclude src/include/limits.h \
--exclude src/lib/crt0.s \
--exclude src/lib/init.c \
--exclude src/lib/ncrt0.s \
--exclude src/lib/system.c \
subc) && mv ../$(DIST) .
docker-build:
docker build . -t subc
docker-run:
docker run --mount src="`pwd`",target=/usr/src/subc,type=bind -it subc