removed clang-format and clang_complete files from the repo
[dosdemo] / GNUmakefile
index c6e94c2..767026f 100644 (file)
@@ -8,14 +8,14 @@ bin = demo
 asmsrc += cspr/dbgfont.asm cspr/confont.asm
 bindata = data/loading.img
 
-inc = -I/usr/local/include -Isrc -Isrc/3dgfx -Isrc/scr -Isrc/glut -Ilibs \
+inc = -I/usr/local/include -Isrc -Isrc/3dgfx -Isrc/scr -Isrc/utils -Isrc/glut -Ilibs \
          -Ilibs/imago/src -Ilibs/mikmod/include
 def = -DMINIGLUT_USE_LIBC -DMIKMOD_STATIC
-warn = -pedantic -Wall -Wno-unused-variable -Wno-unused-function
+warn = -pedantic -Wall -Wno-unused-variable -Wno-unused-function -Wno-address
 #opt = -O3 -ffast-math
 dbg = -g
 
-CFLAGS = $(arch) $(warn) $(opt) -fno-pie -fno-strict-aliasing $(dbg) $(inc)
+CFLAGS = $(arch) $(warn) -MMD $(opt) -fno-pie -fno-strict-aliasing $(dbg) $(inc)
 LDFLAGS = $(arch) -no-pie -Llibs/imago -Llibs/mikmod -limago -lmikmod \
                  $(sndlib_$(sys)) -lm
 
@@ -27,7 +27,7 @@ endif
 
 sys ?= $(shell uname -s | sed 's/MINGW.*/mingw/; s/IRIX.*/IRIX/')
 ifeq ($(sys), mingw)
-       obj = $(src:.c=.w32.o)
+       obj = $(src:.c=.w32.o) $(asmsrc:.asm=.w32.o)
 
        bin = demo_win32.exe
 
@@ -52,15 +52,14 @@ $(bin): $(obj) imago mikmod
 %.o: %.asm
        nasm -f elf -o $@ $<
 
+%.w32.o: %.asm
+       nasm -f coff -o $@ $<
+
 %.w32.o: %.c
        $(CC) -o $@ $(CFLAGS) -c $<
 
 src/data.o: src/data.asm $(bindata)
 
-%.d: %.c
-       @echo dep $@
-       @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
-
 .PHONY: libs
 libs: imago anim mikmod