]> jspc29.x-matter.uni-frankfurt.de Git - trbnettools.git/commitdiff
updated Makefile so now it can be compiled on cris and linux system
authorhadaq <hadaq>
Sun, 22 May 2011 23:36:10 +0000 (23:36 +0000)
committerhadaq <hadaq>
Sun, 22 May 2011 23:36:10 +0000 (23:36 +0000)
libtrbnet/Makefile

index 8028375d25a3a7d63a2407e0dd80b25131fdf970..e0c6c7b3594ab7be765aeb4bdb5043da8f66c474 100644 (file)
@@ -1,10 +1,19 @@
 # ------------ Compiler / Linker Options -------------------------------
 
-AXIS_USABLE_LIBS = UCLIBC GLIBC
-include $(AXIS_TOP_DIR)/tools/build/Rules.axis
+ifdef AXIS_TOP_DIR
+       AXIS_USABLE_LIBS = UCLIBC GLIBC
+       include $(AXIS_TOP_DIR)/tools/build/Rules.axis
+else
+       CC = gcc
+       ifeq ($(shell uname -m), x86_64)
+               CPPFLAGS = -DPEXOR -DX86_64
+       else
+               CPPFLAGS = -DPEXOR
+       endif
+endif
 
 INCDIR = -I.
-CPPFLAGS = #-DTRB_DEBUGGER  #-DHEXMODE 
+CPPFLAGS += #-DTRB_DEBUGGER  #-DHEXMODE 
 
 CFLAGS = -pipe -g -Wall  -Winline -O3 -fPIC -finline-functions -finline-limit=600000
 
@@ -21,7 +30,11 @@ LIB_TARGETS = libtrbnet.a
 
 # ------------ Libaries ------------------------------------------------
 
-AR = ar-cris
+ifeq ($ARCH, crisv32)
+       AR = ar-cris
+else
+       AR = ar
+endif
 ARFLAGS = -srv
 
 # ------------ Pattern Rules -------------------------------------------