-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile
83 lines (62 loc) · 1.84 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
73
74
75
76
77
78
79
80
81
82
83
CC?=gcc
VERSION=0.6git
CCw32?=i486-mingw32-gcc
CFLAGS+=-O2 -Wall
#CFLAGS+=-DVERSION=\"${VERSION}\"
PREFIX?=/usr/local
DESTDIR?=
all: ired bdiff
bdiff: bdiff.o
${CC} ${CFLAGS} bdiff.o -o bdiff
ired.o: calc.c cmd.c io.c util.c hexparse.c
ired.js:
emcc -Os -o ired.js ired.c
ired.arm:
$(CC) -DUSE_DISASM_ARM=1 ired.c -o ired.arm
ired.8086:
$(CC) -fsanitize=address -g -DUSE_DISASM_8086=1 ired.c -o ired.8086
ired.x86:
$(CC) -fsanitize=address -g -DUSE_DISASM_X32=1 ired.c -o ired.x86
# $(CC) -fsanitize=address -g -DUSE_DISASM_X86=1 ired.c -o ired.x86
ired.com: # msdos
owcc -DUSE_DISASM_X32=1 ired.c -o ired.exe
ired.wasm:
emcc -Os -o ired.html ired.c
ired.bc:
clang -emit-llvm -o ired.bc -c ired.c
ired: ired.o
${CC} ${CFLAGS} ired.o -o ired
dist:
@if [ -z "${VERSION}" ]; then echo "Try: make dist VERSION=0.5" ; exit 1 ; fi
git clone . ired-${VERSION}
rm -rf ired-${VERSION}/.git
tar czvf ired-${VERSION}.tar.gz ired-${VERSION}
rm -rf ired-${VERSION}
ios:
$(MAKE) CC="xcrun --sdk iphoneos gcc -arch arm64 -DHAVE_SYSTEM=0"
ios16:
$(MAKE) CC="xcrun --sdk iphoneos gcc -arch armv7 -mno-thumb -DHAVE_SYSTEM=0"
ios32:
$(MAKE) CC="xcrun --sdk iphoneos gcc -arch armv7 -DHAVE_SYSTEM=0"
w32:
${CCw32} ${CFLAGS} ired.c -o ired.exe
v850:
./v850.sh
loc:
@wc -l *.c *.h | grep total
clean:
rm -f ired ired.o bdiff bdiff.o
rm -f ired.x86 ired.arm ired.wasm ired.js
install:
mkdir -p ${DESTDIR}${PREFIX}/bin
cp -f ired ${DESTDIR}${PREFIX}/bin
cp -f bdiff ${DESTDIR}${PREFIX}/bin
cp -f vired ${DESTDIR}${PREFIX}/bin
mkdir -p ${DESTDIR}${PREFIX}/share/man/man1
cp -f ired.1 ${DESTDIR}${PREFIX}/share/man/man1
cp -f vired.1 ${DESTDIR}${PREFIX}/share/man/man1
deinstall uninstall:
rm -f ${DESTDIR}${PREFIX}/bin/ired
rm -f ${DESTDIR}${PREFIX}/bin/vired
rm -f ${DESTDIR}${PREFIX}/share/man/man1/ired.1
rm -f ${DESTDIR}${PREFIX}/share/man/man1/vired.1