mirror of
https://github.com/yquake2/ctf.git
synced 2024-11-12 23:44:30 +00:00
Port the Makefile to our new Windows build environment
This commit is contained in:
parent
22efcc09a5
commit
6286419315
1 changed files with 11 additions and 10 deletions
21
Makefile
21
Makefile
|
@ -12,7 +12,9 @@
|
||||||
# Platforms: #
|
# Platforms: #
|
||||||
# - FreeBSD #
|
# - FreeBSD #
|
||||||
# - Linux #
|
# - Linux #
|
||||||
# - Windows #
|
# - Mac OS X #
|
||||||
|
# - OpenBSD #
|
||||||
|
# - Windows #
|
||||||
# ----------------------------------------------------- #
|
# ----------------------------------------------------- #
|
||||||
|
|
||||||
# Detect the OS
|
# Detect the OS
|
||||||
|
@ -21,7 +23,12 @@ OSTYPE := Windows
|
||||||
else
|
else
|
||||||
OSTYPE := $(shell uname -s)
|
OSTYPE := $(shell uname -s)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# Special case for MinGW
|
||||||
|
ifneq (,$(findstring MINGW,$(OSTYPE)))
|
||||||
|
OSTYPE := Windows
|
||||||
|
endif
|
||||||
|
|
||||||
# Detect the architecture
|
# Detect the architecture
|
||||||
ifeq ($(OSTYPE), Windows)
|
ifeq ($(OSTYPE), Windows)
|
||||||
# At this time only i386 is supported on Windows
|
# At this time only i386 is supported on Windows
|
||||||
|
@ -98,15 +105,9 @@ endif
|
||||||
# ----------
|
# ----------
|
||||||
|
|
||||||
# Cleanup
|
# Cleanup
|
||||||
ifeq ($(OSTYPE), Windows)
|
|
||||||
clean:
|
|
||||||
@echo "===> CLEAN"
|
|
||||||
@-rmdir /S /Q release build
|
|
||||||
else
|
|
||||||
clean:
|
clean:
|
||||||
@echo "===> CLEAN"
|
@echo "===> CLEAN"
|
||||||
${Q}rm -Rf build release
|
${Q}rm -Rf build release
|
||||||
endif
|
|
||||||
|
|
||||||
# ----------
|
# ----------
|
||||||
|
|
||||||
|
@ -114,12 +115,12 @@ endif
|
||||||
ifeq ($(OSTYPE), Windows)
|
ifeq ($(OSTYPE), Windows)
|
||||||
ctf:
|
ctf:
|
||||||
@echo "===> Building game.dll"
|
@echo "===> Building game.dll"
|
||||||
$(Q)tools/mkdir.exe -p release
|
$(Q)mkdir -p release
|
||||||
$(MAKE) release/game.dll
|
$(MAKE) release/game.dll
|
||||||
|
|
||||||
build/%.o: %.c
|
build/%.o: %.c
|
||||||
@echo "===> CC $<"
|
@echo "===> CC $<"
|
||||||
$(Q)tools/mkdir.exe -p $(@D)
|
$(Q)mkdir -p $(@D)
|
||||||
$(Q)$(CC) -c $(CFLAGS) -o $@ $<
|
$(Q)$(CC) -c $(CFLAGS) -o $@ $<
|
||||||
else
|
else
|
||||||
ctf:
|
ctf:
|
||||||
|
|
Loading…
Reference in a new issue