From e43cae9142648343ddb22e258179656d8433b035 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?IOhannes=20m=20zm=C3=B6lnig?= Date: Thu, 27 Nov 2008 09:44:12 +0000 Subject: better arch-autodetection; more cleanup; svn path=/trunk/externals/iem/iemguts/; revision=10396 --- src/Makefile | 44 +++++++++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 19 deletions(-) (limited to 'src') diff --git a/src/Makefile b/src/Makefile index eeaaaa6..13340bf 100644 --- a/src/Makefile +++ b/src/Makefile @@ -16,28 +16,33 @@ EXTENSION=$(MAKECMDGOALS) # if no filename-extension is supplied by the user # try to guess one, based on what "uname" tells us -UNAME := $(shell uname -s) -ifeq ($(UNAME),Linux) +UNAME_SYSTEM := $(shell uname -s) +UNAME_ARCH := $(shell uname -m) +ifeq ($(UNAME_SYSTEM),Linux) DEFAULTEXTENSION= pd_linux -else - ifeq ($(UNAME),Darwin) + ifeq ($(UNAME_ARCH),x86_64) + DEFAULTEXTENSION= l_ia64 + else ifeq ($(UNAME_ARCH),i686) + DEFAULTEXTENSION= l_i386 + endif +else ifeq ($(UNAME_SYSTEM),Darwin) DEFAULTEXTENSION= pd_darwin - else - ifeq (MINGW,$(findstring MINGW,$(UNAME))) - DEFAULTEXTENSION= pd_nt - else - ifeq ($(UNAME),IRIX) - UNAMEV := $(shell uname -R) - ifeq (6.,$(findstring 6.,$(UNAMEV))) - DEFAULTEXTENSION= pd_irix6 - else - DEFAULTEXTENSION= pd_irix5 - endif - else - DEFAULTEXTENSION=help - endif + ifeq ($(UNAME_ARCH),i386) + DEFAULTEXTENSION= d_i386 + else ifeq ($(UNAME_ARCH),PowerPC) + DEFAULTEXTENSION= d_ppc endif +else ifeq (MINGW,$(findstring MINGW,$(UNAME_SYSTEM))) + DEFAULTEXTENSION= pd_nt +else ifeq ($(UNAME_SYSTEM),IRIX) + UNAME_IRIXVERSION := $(shell uname -R) + ifeq (6.,$(findstring 6.,$(UNAME_IRIXVERSION))) + DEFAULTEXTENSION= pd_irix6 + else + DEFAULTEXTENSION= pd_irix5 endif +else + DEFAULTEXTENSION=help endif # if no extension is given, call "make" again with a guessed extension @@ -50,7 +55,8 @@ help: # delete old build files clean: - -rm -f *.dll *.pd_* *.o *.obj *~ + -rm -f *.dll *.w_i386 *.pd_linux *.l_ia64 *.l_i386 *.pd_darwin *.d_fat *.d_ppc *.d_i386 *.pd_irix5 *.pd_irix6 + -rm -f *.o *.obj *~ # we want to compile all C-files we find in the current directory SOURCES=$(sort $(filter %.c, $(wildcard *.c))) -- cgit v1.2.1