From ddb23f18a0c94834d7cf3485a0b5cf011020c92f Mon Sep 17 00:00:00 2001
From: Sven Gestegard Robertz <sven.robertz@cs.lth.se>
Date: Tue, 5 May 2015 16:50:57 +0200
Subject: [PATCH] hacked Makefiles to make them work on macos X

---
 Makefile      | 10 ++++++++++
 test/Makefile |  4 ++--
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 4879b7e..07c4765 100644
--- a/Makefile
+++ b/Makefile
@@ -2,19 +2,29 @@ SUBDIRS=compiler lib test examples packaging
 export LABCOMM_JAR=$(shell pwd)/compiler/labcomm2014_compiler.jar
 export LABCOMM=java -jar $(LABCOMM_JAR) 
 
+UNAME_S=$(shell uname -s)
+
 .PHONY: all
 all: $(SUBDIRS:%=all-%)
 
 .PHONY: all-%
 all-%:
+ifeq ($(UNAME_S),Darwin)
+	DYLD_LIBRARY_PATH=`pwd`/lib/c $(MAKE) -C $*
+else
 	LD_LIBRARY_PATH=`pwd`/lib/c $(MAKE) -C $*
+endif
 
 .PHONY: test
 test: $(SUBDIRS:%=test-%)
 
 .PHONY: test-%
 test-%:
+ifeq ($(UNAME_S),Darwin)
+	DYLD_LIBRARY_PATH=`pwd`/lib/c $(MAKE) -C $* test
+else
 	LD_LIBRARY_PATH=`pwd`/lib/c $(MAKE) -C $* test
+endif
 
 .PHONY: clean
 clean: $(SUBDIRS:%=clean-%)
diff --git a/test/Makefile b/test/Makefile
index e57f3fa..dc3b8b7 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -1,8 +1,8 @@
 TESTS=basic simple nested ref
 LABCOMM_JAR=../compiler/labcomm2014_compiler.jar
 LABCOMM=java -jar $(LABCOMM_JAR)
-MONO_PATH=$(shell realpath ../lib/csharp)
-PYTHONPATH=$(shell realpath ../lib/python)
+MONO_PATH=$(shell pwd)/../lib/csharp
+PYTHONPATH=$(shell pwd)/../lib/python
 
 include ../lib/c/os_compat.mk
 
-- 
GitLab