From 07f037ed4572cfec2432a522bc146013daf0fb97 Mon Sep 17 00:00:00 2001 From: ejones Date: Fri, 30 Jan 2004 07:00:03 +0000 Subject: [PATCH] 2003/05/08 13:38:39 darcs-hash:20040130070003-dddfd-59daacee23a56b5bd674c1b269a5e21997097bce.gz --- Makefile | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index e0ef344..2c80eb2 100644 --- a/Makefile +++ b/Makefile @@ -180,7 +180,7 @@ src/org/ijg/jmorecfg.h: src/org/ijg/jpegsrc.v6b.tar.gz src/org/ijg/jmorecfg.h.pa $(cc_objects): bin-$(platform)/%.cc.o: src/%.cc $(java_headers) src/org/ijg/jmorecfg.h @echo "compiling .cc -> .o: $<" @mkdir -p `dirname $@` - $(g++) -I/usr/X11R6/include/ -I$(gcc_path)/include -Ibin -c $< -o $@ + $(g++) -I/usr/X11R6/include/ -I$(gcc_path)/include -Ibin -Iupstream/$(platform)/include -Wno-multichar -c $< -o $@ $(c_objects): bin-$(platform)/%.c.o: src/%.c src/org/ijg/jmorecfg.h @echo "compiling .c -> .o: $<" @@ -190,6 +190,27 @@ $(c_objects): bin-$(platform)/%.c.o: src/%.c src/org/ijg/jmorecfg.h upstream: cvs -d :pserver:cvs@cvs.xwt.org:/ export upstream HEAD +upstream/Carbon/include/Carbon: + # A disgusting hack to create symlinks to the OS X Framework headers, since the + # standard GCC doesn't know how to search Frameworks for header files. + outdir="upstream/Carbon/include"; \ + librarydir="/System/Library"; \ + frameworksubdir="Frameworks"; \ + cd $$outdir; \ + function CreateHeaderDirectories() \ + { \ + for framework in `ls -d $$1/*.framework`; do \ + name=`echo $$framework | sed 's/.*\/\([^/]*\)\.framework/\1/'`; \ + if [[ $$name != "" && ! -e $$name && -e $$framework/Headers ]]; then \ + ln -s $$framework/Headers $$name; \ + if [[ -e $$framework/$$frameworksubdir ]]; then \ + CreateHeaderDirectories $$framework/$$frameworksubdir; \ + fi; \ + fi; \ + done; \ + }; \ + CreateHeaderDirectories $$librarydir/$$frameworksubdir; + ## Platforms ############################################################################## Linux: @@ -220,15 +241,13 @@ Darwin: upstream platform_link="upstream/darwin/*.[oa] $(gcc_path)/lib/libgcj.a" \ platform_java_sources="POSIX X11" -Carbon: upstream +Carbon: upstream/Carbon/include/Carbon upstream echo -e "\\n=== Carbon =========================================" - ranlib upstream/darwin/*.a - ar x /usr/lib/libcc_dynamic.a upstream/darwin/darwin-fpsave.o make gcj \ platform=Carbon \ target=powerpc-apple-darwin \ target_bin=xwt.carbon \ - platform_link="upstream/darwin/*.[oa] $(gcc_path)/lib/libgcj.a" \ + platform_link="$(gcc_path)/lib/libgcj.a -Xlinker -framework -Xlinker Carbon" \ platform_java_sources="POSIX Carbon" Java2: $(java_classes) bin/org/xwt/builtin.xwar -- 1.7.10.4