This repository was archived by the owner on Feb 28, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathMakefile.in
101 lines (79 loc) · 2.48 KB
/
Makefile.in
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
# This file could have been written in more
# elegant manner, but I'm fine with it's current
# state.
# Kamila Szewczyk, Jul 2019 - May 2021
ifdef DESTDIR
DESTDIR+=/
endif
export CC=@CC@
export CFLAGS=@DISTRO@
TARGETS=bfasm bfvm bfi bconv bfstrip bfderle
.PHONY: all clean install test bfpp redpower uninstall distclean dist preprocessor bfadbg full
full: all install test
all: $(TARGETS) bfpp bin preprocessor
install:
install -v -m 755 bin/asmbf/* $(DESTDIR)@PREFIX@bin
mkdir -p $(DESTDIR)@PREFIX@share/asm2bf
install -v -m 644 bin/lib/* $(DESTDIR)@PREFIX@share/asm2bf
echo "asm2bf has been installed to $(DESTDIR)@PREFIX@."
dist: clean distclean test-clean
mkdir "asm2bf-@VERSION@"
cp -rf b2bf bfpp etc examples bfadbg hla hacking lib-bfm microcode preprocessor redpower test "asm2bf-@VERSION@/"
-cp -f * "asm2bf-@VERSION@/"
cd "asm2bf-@VERSION@" && rm -f Makefile .travis.yml .editorconfig .gitattributes && cd ..
tar -cf "asm2bf-@VERSION@.tar" "asm2bf-@VERSION@/"
rm -rf "asm2bf-@VERSION@"
distclean:
rm -f config.log config.status redpower/Makefile hla/Makefile preprocessor/Makefile etc/bfasm.b
rm -rf autom4te.cache
preprocessor:
make @MSFLAGS@-C preprocessor
redpower:
make @MSFLAGS@-C redpower
bfpp:
make @MSFLAGS@-C bfpp
test: test/*.asm
@chmod a+x test/test.pl $^
@make test-clean
bfmake test/hello_fancy.asm
bfi -d test/hello_fancy.b > /dev/null
bfi -x test/hello_fancy.b > /dev/null
bfi -c test/hello_fancy.b > /dev/null
@echo ""
@test/test.pl $^
sync-test: test/*.asm
@chmod a+x test/test.pl $^
@make test-clean
bfmake test/hello_fancy.asm
bfi -d test/hello_fancy.b > /dev/null
bfi -x test/hello_fancy.b > /dev/null
bfi -c test/hello_fancy.b > /dev/null
@echo ""
@test/test.pl --blocking $^
uninstall:
cd "$(DESTDIR)@PREFIX@bin" && rm bconv bfasm bfderle bfi bfi-rle bflabels bfmake bfpp bfstrip bfvm constpp effective
cd "$(DESTDIR)@PREFIX@share/asm2bf" && rm *.lua
hacking: preprocessor
cp preprocessor/*.c hacking/
clean:
rm -rf bin/
rm -f preprocessor/*.c config.h asm2bf-*.tar $(TARGETS)
-cd bfpp && make clean && cd ..
-cd bfadbg && make clean && cd ..
etc/bfasm.b: bfasm bfstrip etc/bfasm.asm
./bfasm < etc/bfasm.asm | ./bfstrip 79 > $@
bin: $(TARGETS)
mkdir -p bin
mkdir -p bin/asmbf
mkdir -p bin/lib
cp $(TARGETS) bfpp/bfpp bfmake bfi-rle bin/asmbf/
cp lib-bfm/*.lua lib-bfm/*.h bin/lib/
rm -rf $(TARGETS)
bfadbg:
make @MSFLAGS@-C bfadbg
cp bfadbg/bfadbg bin/bfadbg
test-clean:
rm -f test/*.aout
rm -f test/*.b
rm -f test/*.bin
rm -f test/*.c