mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-16 17:31:23 +00:00
de485ec662
detection occurs only if $OS is Windows_NT. Otherwise, spurious nul files are created when compiling on Linux. SVN r878 (trunk)
48 lines
793 B
Makefile
48 lines
793 B
Makefile
ifeq (Windows_NT,$(OS))
|
|
WIN=1
|
|
WINCMD=1
|
|
ifeq ($(findstring msys,$(shell sh --version 2>nul)),msys)
|
|
WINCMD=0
|
|
endif
|
|
endif
|
|
|
|
ifeq (1,$(WIN))
|
|
EXE = makewad.exe
|
|
CFLAGS = -Os -Wall -fomit-frame-pointer
|
|
LDFLAGS = -s -L../../zlib/ -lz
|
|
ZLIB = ../../zlib/libz.a
|
|
else
|
|
EXE = makewad
|
|
CFLAGS = -Dstricmp=strcasecmp -Dstrnicmp=strncasecmp -Os -Wall -fomit-frame-pointer
|
|
LDFLAGS = -s -lz
|
|
ZLIB =
|
|
endif
|
|
|
|
CCDV = @../../ccdv
|
|
CC = gcc
|
|
|
|
OBJS = makewad.o ioapi.o zip.o
|
|
|
|
all: $(EXE)
|
|
|
|
.c.o:
|
|
$(CCDV) $(CC) $(CFLAGS) -c -o $@ $<
|
|
|
|
$(EXE): $(OBJS) $(ZLIB)
|
|
$(CCDV) $(CC) -o $(EXE) $(OBJS) $(LDFLAGS)
|
|
|
|
ifeq (1,$(WIN))
|
|
$(ZLIB):
|
|
make -C ../../zlib -f Makefile.mgw
|
|
endif
|
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
|
ifeq (1,$(WINCMD))
|
|
-del /q /f $(EXE) 2>nul
|
|
-del /q /f *.o 2>nul
|
|
else
|
|
-rm -f $(EXE)
|
|
-rm -f *.o
|
|
endif
|