gzdoom-gles/tools/makewad/Makefile
Randy Heit 95180e18e6 - Modified FLAC/share/alloc.h to define SIZE_T_MAX if it isn't defined
already. For some reason, a stock install of MinGW doesn't define it, but
  if you compile your own GCC, it installs headers that do.
- Changed the way that the makefiles detect MSYS to a method that should
  be more foolproof, thanks to changes in MSYS.

SVN r737 (trunk)
2008-02-10 01:21:45 +00:00

49 lines
795 B
Makefile

ifeq (Windows_NT,$(OS))
WIN=1
WINCMD=1
endif
ifeq ($(findstring msys,$(shell sh --version 2>nul)),msys)
WIN=1
WINCMD=0
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