From be85ec0ec30ce055ac25a76e5dbc0baa198f983b Mon Sep 17 00:00:00 2001 From: hadaq Date: Sun, 22 May 2011 23:36:10 +0000 Subject: [PATCH] updated Makefile so now it can be compiled on cris and linux system --- libtrbnet/Makefile | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/libtrbnet/Makefile b/libtrbnet/Makefile index 8028375..e0c6c7b 100644 --- a/libtrbnet/Makefile +++ b/libtrbnet/Makefile @@ -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 ------------------------------------------- -- 2.43.0