]> git.xonotic.org Git - xonotic/netradiant.git/blobdiff - Makefile
don't count on make predefining $(WINDRES)
[xonotic/netradiant.git] / Makefile
index 334aa1090df52c061a4e84255726272fa2c79226..8c6ee48998f11017eba1783e9c63e8caa71b030f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -24,7 +24,7 @@ CXX                ?= g++
 RANLIB             ?= ranlib
 AR                 ?= ar
 LDD                ?= ldd # nothing on Win32
-WINDRES            ?= # only used on Win32
+WINDRES            ?= windres # only used on Win32
 
 PKGCONFIG          ?= pkg-config
 PKG_CONFIG_PATH    ?=
@@ -144,6 +144,8 @@ endif
 endif
 endif
 
+INSTALLDIR_BASE := $(INSTALLDIR)
+
 ifeq ($(OS),Linux)
        CPPFLAGS_COMMON += -DPOSIX -DXWINDOWS
        CFLAGS_COMMON += -fPIC
@@ -191,7 +193,7 @@ ifeq ($(OS),Darwin)
        # workaround: we have no "ldd" for OS X, so...
        LDD =
 
-#$(error Unsupported build OS: $(OS) - please complete the Darwin support in this Makefile and submit a patch)
+       INSTALLDIR := $(INSTALLDIR_BASE)/NetRadiant.app/Contents/MacOS/install
 else
 
 $(error Unsupported build OS: $(OS))
@@ -200,16 +202,18 @@ endif
 endif
 
 # VERSION!
-RADIANT_VERSION = 1.5.0
+RADIANT_VERSION = 1.5.0n
 RADIANT_MAJOR_VERSION = 5
 RADIANT_MINOR_VERSION = 0
+Q3MAP_VERSION = 2.5.17n
 
 SVN_VERSION := $(shell $(SVNVERSION) -n $(STDERR_TO_DEVNULL) | $(SED) 's/M$$//g; s/.*://g;')
 ifneq ($(SVN_VERSION),)
        RADIANT_VERSION := $(RADIANT_VERSION)-svn$(SVN_VERSION)
+       Q3MAP_VERSION := $(Q3MAP_VERSION)-svn$(SVN_VERSION)
 endif
 
-CPPFLAGS += -DRADIANT_VERSION="\"$(RADIANT_VERSION)\"" -DRADIANT_MAJOR_VERSION="\"$(RADIANT_MAJOR_VERSION)\"" -DRADIANT_MINOR_VERSION="\"$(RADIANT_MINOR_VERSION)\"" -DRADIANT_ABOUTMSG="\"$(RADIANT_ABOUTMSG)\""
+CPPFLAGS += -DRADIANT_VERSION="\"$(RADIANT_VERSION)\"" -DRADIANT_MAJOR_VERSION="\"$(RADIANT_MAJOR_VERSION)\"" -DRADIANT_MINOR_VERSION="\"$(RADIANT_MINOR_VERSION)\"" -DRADIANT_ABOUTMSG="\"$(RADIANT_ABOUTMSG)\"" -DQ3MAP_VERSION="\"$(Q3MAP_VERSION)\""
 
 .PHONY: all
 all: \
@@ -324,7 +328,7 @@ binaries: \
 
 .PHONY: clean
 clean:
-       $(RM_R) $(INSTALLDIR)/
+       $(RM_R) $(INSTALLDIR_BASE)/
        $(FIND) . \( -name \*.o -o -name \*.d -o -name \*.$(DLL) -o -name \*.$(A) -o -name \*.$(EXE) \) -exec $(RM) {} \;
        $(RM) icons/*.rc
 
@@ -935,6 +939,7 @@ $(INSTALLDIR)/heretic2/h2data.$(EXE): \
 install-data: binaries
        $(MKDIR) $(INSTALLDIR)/games
        $(FIND) $(INSTALLDIR)/ -name .svn -exec $(RM_R) {} \; -prune
+       [ "$(OS)" != "Darwin" ] || $(CP_R) setup/data/osx/NetRadiant.app/* $(INSTALLDIR_BASE)/NetRadiant.app/
        set -ex; \
        for GAME in games/*; do \
                if [ -d "$$GAME/tools" ]; then \