1 csrc = $(wildcard src/*.c) $(wildcard src/kern/*.c) $(wildcard src/libc/*.c) \
2 $(wildcard src/3dgfx/*.c)
3 ssrc = $(wildcard src/*.asm) $(wildcard src/kern/*.asm) $(wildcard src/libc/*.asm)
4 obj = $(csrc:.c=.o) $(ssrc:.asm=.o)
8 warn = -pedantic -Wall -Wno-unused-function
10 inc = -Isrc -Isrc/kern -Isrc/libc
14 ASFLAGS = -Isrc/ -Isrc/kern/
15 CFLAGS = -m32 -march=i386 $(warn) $(opt) $(dbg) -fno-pic -ffreestanding \
16 -fno-stack-protector -mpreferred-stack-boundary=2 -nostdinc -ffast-math \
17 -fno-asynchronous-unwind-tables -fno-strict-aliasing $(inc) $(def) -MMD
18 LDFLAGS = -m elf_i386 -nostdlib -T com32.ld -Map game.map
21 $(LD) -o $@ $(obj) $(LDFLAGS)
26 $(AS) -o $@ -f elf $(ASFLAGS) $<
29 $(CC) $(CFLAGS) -masm=intel -S $< -o $@
40 ndisasm -o 0x100 -b 16 $< >$@