1
|
1 # Makefile
|
|
2
|
|
3 CC = cc
|
|
4 RM = rm
|
|
5
|
|
6
|
|
7 .SUFFIXES: .c .o
|
|
8 .c.o:
|
|
9 $(CC) -c $(CFLAGS) -o $@ $<
|
|
10
|
|
11 OBJS = gen.o
|
|
12
|
|
13 gen: $(OBJS)
|
|
14 $(CC) $(OBJS) -ludis86 -o gen
|
|
15 test16: gen
|
|
16 yasm -f bin -o test16.bin test16.asm
|
|
17 echo "[bits 16]" > test16.out
|
|
18 ./gen -16 < test16.bin >> test16.out
|
|
19 diff test16.asm test16.out | more
|
|
20 test32: gen
|
|
21 yasm -f bin -o test32.bin test32.asm
|
|
22 echo "[bits 32]" > test32.out
|
|
23 ./gen -32 < test32.bin >> test32.out
|
|
24 diff test32.asm test32.out | more
|
|
25 test64: gen
|
|
26 yasm -f bin -o test64.bin test64.asm
|
|
27 echo "[bits 64]" > test64.out
|
|
28 ./gen -64 < test64.bin >> test64.out
|
|
29 diff test64.asm test64.out | more
|
|
30 testjmp: gen
|
|
31 yasm -f bin -o testjmp.bin testjmp.asm
|
|
32 udcli -64 < testjmp.bin > testjmp.out
|
|
33 cat testjmp.out | more
|
|
34 clean:
|
|
35 $(RM) -f core ./*.o ./gen *~ *.bin *.out
|