summaryrefslogtreecommitdiff
path: root/GNUmakefile
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <matthias@benkard.de>2008-08-05 12:15:33 +0200
committerMatthias Andreas Benkard <matthias@benkard.de>2008-08-05 12:15:33 +0200
commit3e36acac1fe6eb4ee5baf4d590a6f98013a5b391 (patch)
tree8966be5d01b5fcbdb956e30f642ec79595cc0c72 /GNUmakefile
parentacb878fbe13e171cdb238d64afe11ef2608a0593 (diff)
Add class MLKCompiledProcedure.
Diffstat (limited to 'GNUmakefile')
-rw-r--r--GNUmakefile22
1 files changed, 18 insertions, 4 deletions
diff --git a/GNUmakefile b/GNUmakefile
index 6ee0974..54b8b9b 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -26,14 +26,26 @@ FRAMEWORK_NAME = ToiletKit
BUNDLE_NAME = Test
ifeq ($(DEBUG),YES)
-ADDITIONAL_OBJCFLAGS = -Wall
+ADDITIONAL_OBJCFLAGS += -ggdb3
+endif
+
+HAVE_FFI_H := $(shell echo '\#include <ffi.h>' | $(CC) $(ADDITIONAL_OBJCFLAGS) -c -o /dev/null -x c - 2>/dev/null && echo YES)
+
+ifeq ($(HAVE_FFI_H),YES)
+ ADDITIONAL_OBJCFLAGS += -DHAVE_FFI_H
else
-ADDITIONAL_OBJCFLAGS = -Wall -ggdb3
+ HAVE_FFI_FFI_H := $(shell echo '\#include <ffi/ffi.h>' | $(CC) $(ADDITIONAL_OBJCFLAGS) -c -o /dev/null -x c - 2>/dev/null && echo YES)
+
+ ifeq ($(HAVE_FFI_FFI_H),YES)
+ ADDITIONAL_OBJCFLAGS += -DHAVE_FFI_FFI_H
+ else
+ $(error "Could not find ffi.h. Please install libffi and pass appropriate ADDITIONAL_OBJCFLAGS and ADDITIONAL_LDFLAGS to make.")
+ endif
endif
ToiletKit_OBJC_FILES = functions.m globals.m MLKBackquoteReader.m \
MLKBinding.m MLKCharacter.m MLKCommaReader.m \
- MLKCons.m MLKDoubleFloat.m \
+ MLKCompiledProcedure.m MLKCons.m MLKDoubleFloat.m \
MLKDispatchingMacroCharacterReader.m \
MLKDynamicContext.m MLKEnvironment.m MLKFloat.m \
MLKInteger.m MLKInterpretedClosure.m \
@@ -48,7 +60,8 @@ ToiletKit_OBJC_FILES = functions.m globals.m MLKBackquoteReader.m \
MLKStringReader.m MLKSymbol.m MLKThrowException.m \
MLKValuesFunction.m NSObject-MLKPrinting.m \
NSString-MLKPrinting.m
-ToiletKit_LDFLAGS = -lgmp
+ToiletKit_OBJCFLAGS = -Wall
+ToiletKit_LDFLAGS = -lgmp -lffi
#LIBRARIES_DEPEND_UPON
#TOOL_NAME = etoilet
@@ -66,6 +79,7 @@ etshell_OBJCFLAGS = -w
toilet_OBJC_FILES = MLKReadEvalPrintLoop.m
toilet_OBJC_LIBS += -ledit -lncurses -lToiletKit -LToiletKit.framework \
-LToiletKit.framework/Versions/Current
+toilet_OBJCFLAGS = -Wall
Test_OBJC_FILES = MLKLowLevelTests.m
Test_OBJC_LIBS = -lUnitKit -LToiletKit.framework -lToiletKit