ref: 2c2c145fbb538b7fc8080bf69fb56ff5c9adc098
parent: fe8b88cfc681d085c706f4364fd19b295ae7444b
parent: 3707cc21abf5ee271f76f712c9be6609fd542e0b
author: Jeff Bezanson <jeff.bezanson@gmail.com>
date: Sun May 12 19:29:18 EDT 2013
Merge pull request #7 from jondistad/osx-update Minor modifications to build on current OS X machine
--- a/Makefile.macosx
+++ b/Makefile.macosx
@@ -1,4 +1,5 @@
-CC = gcc
+CC ?= gcc
+CARBON_HEADERS ?= "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/Developer/Headers"
NAME = flisp
SRCS = $(NAME).c builtins.c string.c equalhash.c table.c iostream.c
@@ -9,7 +10,7 @@
LLTDIR = llt
LLT = $(LLTDIR)/libllt.a
-CONFIG = -DMACOSX -DARCH_X86_64 -DBITS64 -D__CPU__=686
+CONFIG = -DMACOSX -DARCH_X86_64 -DBITS64 -D__CPU__=686 -I$(CARBON_HEADERS)
FLAGS = -falign-functions -Wall -Wno-strict-aliasing -I$(LLTDIR) $(CFLAGS) -DUSE_COMPUTED_GOTO $(CONFIG)
LIBFILES = $(LLT)
LIBS = $(LIBFILES) -lm -framework ApplicationServices
--- a/llt/dirpath.c
+++ b/llt/dirpath.c
@@ -113,8 +113,8 @@
return buf;
}
#elif defined(MACOSX)
-#include "/Developer/Headers/FlatCarbon/Processes.h"
-#include "/Developer/Headers/FlatCarbon/Files.h"
+#include <FlatCarbon/Processes.h>
+#include <FlatCarbon/Files.h>
char *get_exename(char *buf, size_t size)
{
ProcessSerialNumber PSN;
--- a/llt/dtypes.h
+++ b/llt/dtypes.h
@@ -28,6 +28,7 @@
#endif
+#if !defined (BITS32) && !defined (BITS64)
#ifndef __SIZEOF_POINTER__
# error "__SIZEOF_POINTER__ undefined"
#endif
@@ -37,6 +38,7 @@
# define BITS32
#else
# error "this is one weird machine"
+#endif
#endif