mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-14 16:40:56 +00:00
95180e18e6
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)
50 lines
863 B
Makefile
50 lines
863 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 = xlatcc.exe
|
|
CFLAGS = $(LOC) -Os -Wall -fomit-frame-pointer
|
|
else
|
|
EXE = xlatcc
|
|
CFLAGS = -Dstricmp=strcasecmp -Dstrnicmp=strncasecmp $(LOC) -Os -Wall -fomit-frame-pointer
|
|
endif
|
|
|
|
CCDV = @../../ccdv
|
|
CC = gcc
|
|
LDFLAGS= -s
|
|
|
|
LEMON = ../lemon/lemon
|
|
LEMONFLAGS =
|
|
|
|
OBJS = gen.o xlat-parse.o
|
|
|
|
all: $(EXE)
|
|
|
|
$(EXE): $(OBJS)
|
|
$(CCDV) $(CC) $(LDFLAGS) -o $(EXE) $(OBJS)
|
|
|
|
.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
|
|
|
|
xlat-parse.o: xlat-parse.c xlat.h xlat-parse.h
|
|
$(CCDV) $(CC) $(CFLAGS) -c -o $@ $<
|
|
|
|
xlat-parse.c xlat-parse.h: xlat-parse.y
|
|
$(CCDV) $(LEMON) $(LEMONFLAGS) $<
|
|
|
|
gen.o: gen.c xlat.h
|
|
$(CCDV) $(CC) $(CFLAGS) -c -o $@ $<
|