-
Notifications
You must be signed in to change notification settings - Fork 9
/
Makefile
51 lines (39 loc) · 1.12 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
SHELL=/bin/bash
LD=ld -m elf_i386 -lc --dynamic-linker=/lib/ld-linux.so.2 -s
all: ff
ff.o: fflin.asm ff.asm fflinio.asm ff.boot fflin.boot
fasm $< $@
ff: ff.o
$(LD) -o $@ $<
cmpl dict: ff
./ff -f mkimage.ff
fftk.o: fftk.asm cmpl dict
fasm $< $@
fftk: fftk.o
$(LD) -o $@ $<
clean:
rm -f ff fftk *.o
test: ff
@echo ff
@for d in test/*; do echo -ne $$d \\e[21G; ./ff -f $$d | tail -1; done
@echo ff +longconds
@for d in test/*; do echo -ne $$d \\e[21G; ./ff +longconds -f $$d | tail -1; done
@echo fftk
@./ff -f test.ff -f mkimage.ff
@$(MAKE) fftk >/dev/null
@for d in test/*; do echo -ne $$d \\e[21G; ./fftk -f $$d | tail -1; done
@echo fftk +longconds
@./ff +longconds -f test.ff -f mkimage.ff
@$(MAKE) fftk >/dev/null
@for d in test/*; do echo -ne $$d \\e[21G; ./fftk -f $$d | tail -1; done
PREFIX=$$HOME/.local
FFBIN=$(PREFIX)/bin
install-bin: ff
install -m 775 -d $(FFBIN)
install -m 775 $^ $(FFBIN)
FFSHARE=$(PREFIX)/share/ff
install-share: ff.ff ff.help lib/*
install -m 775 -d $(FFSHARE)
install -m 664 $^ $(FFSHARE)
install: install-bin install-share
.PHONY: clean test install install-bin install-share