X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=dosdemo;a=blobdiff_plain;f=Makefile.dj;h=2088717232d6d461202889f17edf3dfd6e999a76;hp=4b3f7a77061e113feb02c026ece00ba76d9c0324;hb=8f7234e08947a80bace3643f37214c5fb076bdfe;hpb=3d4c7952e336fb4c7a914c861f12c15e64f9ec1e diff --git a/Makefile.dj b/Makefile.dj index 4b3f7a7..2088717 100644 --- a/Makefile.dj +++ b/Makefile.dj @@ -1,5 +1,6 @@ src = $(wildcard src/*.c) $(wildcard src/dos/*.c) -obj = $(src:.c=.cof) +asmsrc = $(wildcard src/*.asm) $(wildcard src/dos/*.asm) +obj = $(src:.c=.cof) $(asmsrc:.asm=.cof) dep = $(obj:.cof=.dep) bin = demo.exe @@ -10,18 +11,22 @@ else TOOLPREFIX = i586-pc-msdosdjgpp- endif -inc = -Isrc -Isrc/dos -Ilibs/imago/src -Ilibs/oldmik/src -opt = -O3 -ffast-math +inc = -Isrc -Isrc/dos -Ilibs/imago/src -Ilibs/mikmod/include +opt = -O3 -ffast-math -fno-strict-aliasing dbg = -g +warn = -pedantic -Wall -Wno-unused-function -Wno-unused-variable CC = $(TOOLPREFIX)gcc AR = $(TOOLPREFIX)ar -CFLAGS = -pedantic -Wall -march=pentium $(dbg) $(opt) $(inc) -LDFLAGS = libs/imago/imago.dja libs/oldmik/mikmod.dja +CFLAGS = $(warn) -march=pentium $(dbg) $(opt) $(inc) +LDFLAGS = libs/imago/imago.dja libs/mikmod/dos/libmikmod.a $(bin): $(obj) imago mikmod $(CC) -o $@ -Wl,-Map=ld.map $(obj) $(LDFLAGS) +%.cof: %.asm + nasm -f coff -o $@ $< + -include $(dep) %.cof: %.c @@ -36,12 +41,12 @@ imago: .PHONY: mikmod mikmod: - $(MAKE) -C libs/oldmik -f Makefile.dj + $(MAKE) -C libs/mikmod/dos -f Makefile.dj .PHONY: cleanlibs cleanlibs: $(MAKE) -C libs/imago -f Makefile.dj clean - $(MAKE) -C libs/oldmik -f Makefile.dj clean + $(MAKE) -C libs/mikmod/dos -f Makefile.dj clean .PHONY: clean .PHONY: cleandep