2006-04-29 04:52:30 +00:00
|
|
|
ifeq (Windows_NT,$(OS))
|
|
|
|
EXE = makewad.exe
|
|
|
|
CCDV = @../../ccdv
|
|
|
|
CFLAGS = -Os -Wall -fomit-frame-pointer
|
2006-05-29 09:00:20 +00:00
|
|
|
LDFLAGS = -s -L../../zlib/ -lz
|
2006-05-16 04:19:20 +00:00
|
|
|
ZLIB = ../../zlib/libz.a
|
2006-04-29 04:52:30 +00:00
|
|
|
else
|
|
|
|
EXE = makewad
|
2006-06-08 02:43:35 +00:00
|
|
|
CCDV = @../../ccdv
|
2006-04-29 04:52:30 +00:00
|
|
|
CFLAGS = -Dstricmp=strcasecmp -Dstrnicmp=strncasecmp -Os -Wall -fomit-frame-pointer
|
2006-05-29 09:00:20 +00:00
|
|
|
LDFLAGS = -s -lz
|
2006-05-16 04:19:20 +00:00
|
|
|
ZLIB =
|
2006-04-29 04:52:30 +00:00
|
|
|
endif
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
CC = gcc
|
|
|
|
|
2006-04-29 04:52:30 +00:00
|
|
|
OBJS = makewad.o ioapi.o zip.o
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
all: $(EXE)
|
|
|
|
|
|
|
|
.c.o:
|
|
|
|
$(CCDV) $(CC) $(CFLAGS) -c -o $@ $<
|
|
|
|
|
2006-05-16 04:19:20 +00:00
|
|
|
$(EXE): $(OBJS) $(ZLIB)
|
|
|
|
$(CCDV) $(CC) -o $(EXE) $(OBJS) $(LDFLAGS)
|
|
|
|
|
|
|
|
ifeq (Windows_NT,$(OS))
|
|
|
|
$(ZLIB):
|
|
|
|
make -C ../../zlib -f Makefile.mgw
|
|
|
|
endif
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
.PHONY: clean
|
|
|
|
|
|
|
|
clean:
|
2006-04-29 04:52:30 +00:00
|
|
|
ifeq (Windows_NT,$(OS))
|
2006-02-24 04:48:15 +00:00
|
|
|
-del /q /f $(EXE) 2>nul
|
|
|
|
-del /q /f *.o 2>nul
|
2006-04-29 04:52:30 +00:00
|
|
|
else
|
|
|
|
-rm -f $(EXE)
|
|
|
|
-rm -f *.o
|
|
|
|
endif
|