X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=Makefile;h=ecb5fb6ce27bd911ffa627da328f0029a98142d5;hb=c75ae4296b59dbdc836355dcf8478bc097b32ebd;hp=564a3c97f89d2050189fb9fbc5a2dd3a2e84da60;hpb=e240a832bda898b5be0289d1799b8fbd9cb06050;p=xonotic%2Fnetradiant.git diff --git a/Makefile b/Makefile index 564a3c97..ecb5fb6c 100644 --- a/Makefile +++ b/Makefile @@ -48,7 +48,7 @@ GIT ?= git SVN ?= svn WGET ?= wget MV ?= mv -UNZIP ?= unzip +UNZIPPER ?= unzip FD_TO_DEVNULL ?= >/dev/null STDOUT_TO_DEVNULL ?= 1$(FD_TO_DEVNULL) @@ -179,7 +179,7 @@ ifeq ($(OS),Win32) CPPFLAGS_COMMON += -DWIN32 -D_WIN32 -D_inline=inline CFLAGS_COMMON += -mms-bitfields LDFLAGS_DLL = --dll -Wl,--add-stdcall-alias - LIBS_COMMON = -lws2_32 -luser32 -lgdi32 + LIBS_COMMON = -lws2_32 -luser32 -lgdi32 -lole32 EXE ?= exe A = a DLL = dll @@ -224,7 +224,8 @@ endif endif # VERSION! -RADIANT_VERSION = 1.5.0n +RADIANT_VERSION_NUMBER = 1.5.0 +RADIANT_VERSION = $(RADIANT_VERSION_NUMBER)n RADIANT_MAJOR_VERSION = 5 RADIANT_MINOR_VERSION = 0 Q3MAP_VERSION = 2.5.17n @@ -289,7 +290,7 @@ dependencies-check: checkbinary binutils "$(RANLIB)"; \ checkbinary binutils "$(AR)"; \ checkbinary pkg-config "$(PKGCONFIG)"; \ - checkbinary unzip "$(UNZIP)"; \ + checkbinary unzip "$(UNZIPPER)"; \ checkbinary git-core "$(GIT)"; \ checkbinary subversion "$(SVN)"; \ checkbinary wget "$(WGET)"; \ @@ -304,11 +305,20 @@ dependencies-check: { \ $(ECHO_NOLF) "Checking for $$2 ($$1)... "; \ if \ - $(CXX) conftest.cpp $(CFLAGS) $(CXXFLAGS) $(CFLAGS_COMMON) $(CXXFLAGS_COMMON) $(CPPFLAGS) $(CPPFLAGS_COMMON) $$4 -DCONFTEST_HEADER="<$$2>" -DCONFTEST_SYMBOL="$$3" $(TARGET_ARCH) $(LDFLAGS) -c -o conftest.o >&3 $(STDERR_TO_STDOUT) && \ - $(CXX) conftest.o $(LDFLAGS) $(LDFLAGS_COMMON) $$5 $(LIBS_COMMON) $(LIBS) -o conftest >&3 $(STDERR_TO_STDOUT); \ + $(CXX) conftest.cpp $(CFLAGS) $(CXXFLAGS) $(CFLAGS_COMMON) $(CXXFLAGS_COMMON) $(CPPFLAGS) $(CPPFLAGS_COMMON) $$4 -DCONFTEST_HEADER="<$$2>" -DCONFTEST_SYMBOL="$$3" $(TARGET_ARCH) $(LDFLAGS) -c -o conftest.o >&3 $(STDERR_TO_STDOUT); \ then \ - $(RM) conftest conftest.o conftest.d; \ - $(ECHO) "found."; \ + if \ + $(CXX) conftest.o $(LDFLAGS) $(LDFLAGS_COMMON) $$5 $(LIBS_COMMON) $(LIBS) -o conftest >&3 $(STDERR_TO_STDOUT); \ + then \ + $(RM) conftest conftest.o conftest.d; \ + $(ECHO) "found and links."; \ + else \ + $(RM) conftest.o conftest.d; \ + $(ECHO) "found but does not link, please install it or set PKG_CONFIG_PATH right!"; \ + $(ECHO) "To see the failed commands, set DEPENDENCIES_CHECK=verbose"; \ + $(ECHO) "To proceed anyway, set DEPENDENCIES_CHECK=off"; \ + failed=1; \ + fi; \ else \ $(RM) conftest conftest.o conftest.d; \ $(ECHO) "not found, please install it or set PKG_CONFIG_PATH right!"; \ @@ -333,7 +343,17 @@ endif .PHONY: binaries binaries: \ - $(INSTALLDIR)/heretic2/h2data.$(EXE) \ + binaries-tools \ + binaries-radiant \ + +.PHONY: binaries-radiant-all +binaries-radiant: \ + binaries-radiant-modules \ + binaries-radiant-plugins \ + binaries-radiant-core \ + +.PHONY: binaries-radiant-modules +binaries-radiant-modules: \ $(INSTALLDIR)/modules/archivepak.$(DLL) \ $(INSTALLDIR)/modules/archivewad.$(DLL) \ $(INSTALLDIR)/modules/archivezip.$(DLL) \ @@ -348,17 +368,56 @@ binaries: \ $(INSTALLDIR)/modules/model.$(DLL) \ $(INSTALLDIR)/modules/shaders.$(DLL) \ $(INSTALLDIR)/modules/vfspk3.$(DLL) \ + +.PHONY: binaries-radiant-plugins +binaries-radiant-plugins: \ $(INSTALLDIR)/plugins/bobtoolz.$(DLL) \ $(INSTALLDIR)/plugins/brushexport.$(DLL) \ $(INSTALLDIR)/plugins/prtview.$(DLL) \ $(INSTALLDIR)/plugins/shaderplug.$(DLL) \ $(INSTALLDIR)/plugins/sunplug.$(DLL) \ $(INSTALLDIR)/plugins/ufoaiplug.$(DLL) \ + +.PHONY: binaries-radiant +binaries-radiant-core: \ + $(INSTALLDIR)/radiant.$(EXE) \ + +.PHONY: binaries-tools +binaries-tools: \ + binaries-tools-quake2 \ + binaries-tools-quake3 \ + +.PHONY: binaries-tools-quake2 +binaries-tools-quake2: \ + binaries-q2map \ + binaries-qdata3 \ + binaries-h2data \ + +.PHONY: binaries-q2map +binaries-q2map: \ $(INSTALLDIR)/q2map.$(EXE) \ + +.PHONY: binaries-qdata3 +binaries-qdata3: \ + $(INSTALLDIR)/qdata3.$(EXE) \ + +.PHONY: binaries-h2data +binaries-h2data: \ + $(INSTALLDIR)/heretic2/h2data.$(EXE) + +.PHONY: binaries-tools-quake3 +binaries-tools-quake3: \ + binaries-q3data \ + binaries-q3map2 \ + +.PHONY: binaries-q3data +binaries-q3data: \ $(INSTALLDIR)/q3data.$(EXE) \ + +.PHONY: binaries-q3map2 +binaries-q3map2: \ $(INSTALLDIR)/q3map2.$(EXE) \ - $(INSTALLDIR)/qdata3.$(EXE) \ - $(INSTALLDIR)/radiant.$(EXE) \ + .PHONY: clean clean: @@ -415,6 +474,7 @@ $(INSTALLDIR)/q3map2.$(EXE): \ tools/quake3/q3map2/bspfile_rbsp.o \ tools/quake3/q3map2/bsp.o \ tools/quake3/q3map2/convert_ase.o \ + tools/quake3/q3map2/convert_obj.o \ tools/quake3/q3map2/convert_map.o \ tools/quake3/q3map2/decals.o \ tools/quake3/q3map2/facebsp.o \ @@ -446,6 +506,7 @@ $(INSTALLDIR)/q3map2.$(EXE): \ tools/quake3/q3map2/vis.o \ tools/quake3/q3map2/writebsp.o \ libddslib.$(A) \ + libfilematch.$(A) \ libjpeg6.$(A) \ libl_net.$(A) \ libmathlib.$(A) \ @@ -633,6 +694,7 @@ $(INSTALLDIR)/radiant.$(EXE): \ radiant/xmlstuff.o \ radiant/xywindow.o \ libcmdlib.$(A) \ + libfilematch.$(A) \ libgtkutil.$(A) \ libl_net.$(A) \ libmathlib.$(A) \ @@ -640,6 +702,10 @@ $(INSTALLDIR)/radiant.$(EXE): \ libxmllib.$(A) \ $(if $(findstring $(OS),Win32),icons/radiant.o,) \ +libfilematch.$(A): CPPFLAGS_EXTRA := -Ilibs +libfilematch.$(A): \ + libs/filematch.o \ + libcmdlib.$(A): CPPFLAGS_EXTRA := -Ilibs libcmdlib.$(A): \ libs/cmdlib/cmdlib.o \ @@ -975,7 +1041,7 @@ install-data: binaries $(MKDIR) $(INSTALLDIR)/games $(FIND) $(INSTALLDIR_BASE)/ -name .svn -exec $(RM_R) {} \; -prune [ "$(OS)" != "Darwin" ] || $(CP_R) setup/data/osx/NetRadiant.app/* $(INSTALLDIR_BASE)/NetRadiant.app/ - DOWNLOAD_GAMEPACKS="$(DOWNLOAD_GAMEPACKS)" GIT="$(GIT)" SVN="$(SVN)" WGET="$(WGET)" RM_R="$(RM_R)" MV="$(MV)" UNZIP="$(UNZIP)" ECHO="$(ECHO)" SH="$(SH)" CP="$(CP)" CP_R="$(CP_R)" $(SH) install-gamepacks.sh "$(INSTALLDIR)" + DOWNLOAD_GAMEPACKS="$(DOWNLOAD_GAMEPACKS)" GIT="$(GIT)" SVN="$(SVN)" WGET="$(WGET)" RM_R="$(RM_R)" MV="$(MV)" UNZIPPER="$(UNZIPPER)" ECHO="$(ECHO)" SH="$(SH)" CP="$(CP)" CP_R="$(CP_R)" $(SH) install-gamepacks.sh "$(INSTALLDIR)" $(ECHO) $(RADIANT_MINOR_VERSION) > $(INSTALLDIR)/RADIANT_MINOR $(ECHO) $(RADIANT_MAJOR_VERSION) > $(INSTALLDIR)/RADIANT_MAJOR $(CP_R) setup/data/tools/* $(INSTALLDIR)/ @@ -997,4 +1063,25 @@ install-dll: binaries endif endif +# release building... NOT for general users +# these may use tools not in the list that is checked by the build system +release-src: BUILD_DATE := $(shell date +%Y%m%d) +release-src: INSTALLDIR := netradiant-$(RADIANT_VERSION_NUMBER)-$(BUILD_DATE) +release-src: + $(GIT) archive --format=tar --prefix=$(INSTALLDIR)/ HEAD | bzip2 > ../$(INSTALLDIR).tar.bz2 + +release-win32: BUILD_DATE := $(shell date +%Y%m%d) +release-win32: INSTALLDIR := netradiant-$(RADIANT_VERSION_NUMBER)-$(BUILD_DATE) +release-win32: + $(MAKE) all INSTALLDIR=$(INSTALLDIR) MAKEFILE_CONF=cross-Makefile.conf RADIANT_ABOUTMSG="Official release build" BUILD=release + 7za a -sfx../../../../../../../../../../$(HOME)/7z.sfx ../$(INSTALLDIR)-win32-7z.exe $(INSTALLDIR)/ + chmod 644 ../$(INSTALLDIR)-win32-7z.exe # 7zip is evil + $(MAKE) clean INSTALLDIR=$(INSTALLDIR) MAKEFILE_CONF=cross-Makefile.conf RADIANT_ABOUTMSG="Official release build" BUILD=release + +release-all: + $(GIT) clean -xdf + $(MAKE) release-src + $(MAKE) release-win32 + +# load dependency files -include $(shell find . -name \*.d)