From: Rudolf Polzer Date: Sat, 6 Jul 2013 16:54:44 +0000 (+0200) Subject: also add an unsuffixed symlink, fixes #1710 X-Git-Tag: xonotic-v0.8.0~11 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=e63a12c41854e2323ce20104b54c8fa6f057191e;p=xonotic%2Fnetradiant.git also add an unsuffixed symlink, fixes #1710 --- diff --git a/Makefile b/Makefile index 689a61d4..7bc32d70 100644 --- a/Makefile +++ b/Makefile @@ -37,6 +37,8 @@ CAT ?= cat MKDIR ?= mkdir -p CP ?= cp CP_R ?= $(CP) -r +LN ?= ln +LN_SNF ?= $(LN) -snf RM ?= rm RM_R ?= $(RM) -r TEE_STDERR ?= | tee /dev/stderr @@ -167,12 +169,15 @@ endif INSTALLDIR_BASE := $(INSTALLDIR) +MAKE_EXE_SYMLINK = false + ifeq ($(OS),Linux) CPPFLAGS_COMMON += -DPOSIX -DXWINDOWS CFLAGS_COMMON += -fPIC LDFLAGS_DLL = -fPIC -ldl LIBS_COMMON = -lpthread EXE ?= $(shell uname -m) + MAKE_EXE_SYMLINK = true A = a DLL = so MWINDOWS = @@ -204,7 +209,8 @@ ifeq ($(OS),Darwin) CPPFLAGS_COMMON += -I$(MACLIBDIR)/../include -I/usr/X11R6/include LDFLAGS_COMMON += -L$(MACLIBDIR) -L/usr/X11R6/lib LDFLAGS_DLL += -dynamiclib -ldl - EXE ?= ppc + EXE ?= $(shell uname -m) + MAKE_EXE_SYMLINK = true A = a DLL = dylib MWINDOWS = @@ -433,6 +439,7 @@ clean: file=$@; $(MKDIR) $${file%/*} $(CXX) $^ $(LDFLAGS) $(LDFLAGS_COMMON) $(LDFLAGS_EXTRA) $(LIBS_EXTRA) $(LIBS_COMMON) $(LIBS) -o $@ [ -z "$(LDD)" ] || [ -z "`$(LDD) -r $@ $(STDERR_TO_STDOUT) $(STDOUT_TO_DEVNULL) $(TEE_STDERR)`" ] || { $(RM) $@; exit 1; } + if $(MAKE_EXE_SYMLINK); then o=$@; $(LN_SNF) $${o##*/} $*; fi %.$(A): $(AR) rc $@ $^