X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;ds=inline;f=Makefile;h=e4b62f86f6ed20db98c0242656a5637fc7408d85;hb=15a13efb20311cf8d151dc86602e7b97be3372ff;hp=9a8942f5cc688609f5c6832ff392db3381cb6876;hpb=28d5d8d6f0b9da979030465c304157a4919ca6de;p=metatoy diff --git a/Makefile b/Makefile index 9a8942f..e4b62f8 100644 --- a/Makefile +++ b/Makefile @@ -1,32 +1,18 @@ -csrc = $(wildcard src/*.c) $(wildcard src/kern/*.c) $(wildcard src/libc/*.c) -ssrc = $(wildcard src/*.asm) $(wildcard src/kern/*.asm) $(wildcard src/libc/*.asm) -obj = $(csrc:.c=.o) $(ssrc:.asm=.o) -dep = $(csrc:.c=.d) -bin = game.com +src = $(wildcard src/*.c) $(wildcard src/nondos/*.c) $(wildcard src/3dgfx/*.c) +obj = $(src:.c=.o) +dep = $(src:.c=.d) +bin = game -warn = -pedantic -Wall -Wno-unused-function -opt = -O2 -inc = -Isrc -Isrc/kern -Isrc/libc +inc = -Isrc -Isrc/3dgfx -Isrc/kern -AS = nasm - -ASFLAGS = -Isrc/ -Isrc/kern/ -CFLAGS = -m32 -march=i386 $(warn) $(opt) $(dbg) -fno-pic -ffreestanding \ - -fno-stack-protector -mpreferred-stack-boundary=2 -nostdinc -ffast-math \ - -fno-asynchronous-unwind-tables $(inc) $(def) -MMD -LDFLAGS = -m elf_i386 -nostdlib -T com32.ld -Map game.map +CFLAGS = -pedantic -Wall -O2 -ffast-math -fno-strict-aliasing -g $(inc) -MMD +LDFLAGS = -lGL -lX11 -lXext -lm $(bin): $(obj) - $(LD) -o $@ $(obj) $(LDFLAGS) + $(CC) -o $@ $(obj) $(LDFLAGS) -include $(dep) -%.o: %.asm - $(AS) -o $@ -f elf $(ASFLAGS) $< - -%.s: %.c - $(CC) $(CFLAGS) -masm=intel -S $< -o $@ - .PHONY: clean clean: rm -f $(obj) $(bin) @@ -34,6 +20,3 @@ clean: .PHONY: cleandep cleandep: rm -f $(dep) - -disasm: $(bin) - ndisasm -o 0x100 -b 16 $< >$@