summaryrefslogtreecommitdiff
path: root/Objective-C/GNUmakefile
diff options
context:
space:
mode:
authorMatthias Benkard <code@mail.matthias.benkard.de>2007-10-18 12:24:17 +0200
committerMatthias Benkard <code@mail.matthias.benkard.de>2007-10-18 12:24:17 +0200
commitf28542b9b45f83250a6d01bc062b65244d166a1c (patch)
tree962e70f79e2035d926c01544ef9d3812ee3cba57 /Objective-C/GNUmakefile
parentc82df70302f8ca78868f775f9f2a6c4ef6ba9f9c (diff)
Support building on Mac OS X without gnustep-make.
darcs-hash:fd214e0244570e27679db980171f866332808a56
Diffstat (limited to 'Objective-C/GNUmakefile')
-rw-r--r--Objective-C/GNUmakefile25
1 files changed, 23 insertions, 2 deletions
diff --git a/Objective-C/GNUmakefile b/Objective-C/GNUmakefile
index 31b0db0..72ad050 100644
--- a/Objective-C/GNUmakefile
+++ b/Objective-C/GNUmakefile
@@ -15,7 +15,7 @@
## along with this program. If not, see <http://www.gnu.org/licenses/>.
-include $(GNUSTEP_MAKEFILES)/common.make
+-include $(GNUSTEP_MAKEFILES)/common.make
include ../version.make
@@ -35,4 +35,25 @@ ADDITIONAL_OBJCFLAGS += -DUSE_LIBFFI
libobjcl_OBJC_FILES += libffi_support.m
endif
-include $(GNUSTEP_MAKEFILES)/library.make
+ifneq ($(COMMON_MAKE_LOADED),)
+-include $(GNUSTEP_MAKEFILES)/library.make
+else # Mac OS X
+libobjcl_OBJ_FILES = $(patsubst %.m,obj/%.o,$(libobjcl_OBJC_FILES))
+
+all: obj/libobjcl.dylib
+
+clean:
+ rm -f obj/libobjcl.dylib obj/libobjcl.dylib.$(VERSION) $(libobjcl_OBJ_FILES)
+
+obj/libobjcl.dylib: obj/libobjcl.dylib.$(VERSION)
+ ln -s libobjcl.dylib.$(VERSION) $@
+
+obj/libobjcl.dylib.$(VERSION): $(libobjcl_OBJ_FILES)
+ make -p obj
+ gcc -dynamiclib -current_version $(VERSION) -flat_namespace -undefined warning -install_name libobjcl.dylib.$(VERSION) -o $@ $(libobjcl_OBJ_FILES) -fnext-runtime -framework AppKit -framework Foundation -lm $(ADDITIONAL_LDFLAGS) $(ADDITIONAL_OBJCFLAGS)
+
+obj/%.o: %.m
+ mkdir -p obj
+ gcc -o $@ -c $< -MMD -MP -DNeXT_Foundation_LIBRARY=1 -DNeXT_GUI_LIBRARY=1 -DNeXT_RUNTIME=1 -dynamic -fno-common -fno-omit-frame-pointer -Wno-import -fno-strict-aliasing -fnext-runtime -I. $(ADDITIONAL_OBJCFLAGS)
+endif
+