Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

(OS X) Check architecture to use intermediate step of compiling maste…

…r.o or not.

darcs-hash:20071126111707-c1071-c2fa0b3ae3d16968dba072c82d6a856b5a647d50.gz
  • Loading branch information...
commit 4921ef9f0acb000d49c2e2e21bf40aecd8b40090 1 parent 3687a51
@shelarcy shelarcy authored
Showing with 11 additions and 0 deletions.
  1. +5 −0 configure
  2. +6 −0 makefile
View
5 configure
@@ -56,6 +56,9 @@ wxversion=""
extraldopts=""
withopengl="no"
+# check architecture, for mac os x
+architecture=""
+
# stc
withstc="no"
wxcstc=""
@@ -229,6 +232,7 @@ if findprogram "$wxconfig"; then
else if test "$wxtoolkit" = "mac"; then
dll=".dylib"
lib="lib"
+ architecture=`uname -p`
# use a standard prefix on MacOS X for the installer
prefix="/usr/local/wxhaskell"
fi
@@ -819,6 +823,7 @@ WXWIN-REZFILE=$wxrezfile
EXE=$exe
DLL=$dll
LIB=$lib
+ARCHITECTURE=$architecture
# Documentation
HDOCFOUND=$hdocfound
View
6 makefile
@@ -729,7 +729,13 @@ $(basename $(WXC-LIB)).so: $(WXC-OBJS)
# dynamic link library on macOSX: generates single .so file
$(basename $(WXC-LIB)).dylib: $(WXC-OBJS)
+ifeq ($(ARCHITECTURE),powerpc)
+ $(CXX) -r -keep_private_externs -nostdlib -o $(WXC-OUTDIR)/master.o $^ $(WXC-LIBS) -lSystemStubs -shared-libgcc -lstdc++-static
+ $(CXX) -dynamiclib -install_name $(SHARED-PREFIX)$(notdir $@) -undefined suppress -flat_namespace -o $@ $(WXC-OUTDIR)/master.o $(filter-out %.a,$(WXC-LIBS))
+ $(RM) -f $(WXC-OUTDIR)/master.o
+else
$(CXX) -dynamiclib -install_name $(SHARED-PREFIX)$(notdir $@) -undefined suppress -flat_namespace -o $@ $^ $(filter-out %.a,$(WXC-LIBS))
+endif
# create an object file from source files
$(WXC-OBJS): $(WXC-OUTDIR)/%.o: $(WXC-SRCDIR)/%.cpp
Please sign in to comment.
Something went wrong with that request. Please try again.