Skip to content

Instantly share code, notes, and snippets.

@kreitje
Created January 17, 2012 16:15
Show Gist options
  • Save kreitje/1627281 to your computer and use it in GitHub Desktop.
Save kreitje/1627281 to your computer and use it in GitHub Desktop.
OSX XAMPP MakeFile
####
### Changes to let mod_wsgi install over OSX under XAMPP
###
### Changes:
### Changed "-arch ppc" in the CFLAGS and LDFLAGS to "-arch x86_64"
###
# Copyright 2007 GRAHAM DUMPLETON
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
APXS = /Applications/XAMPP/xamppfiles/bin/apxs
PYTHON = /System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7
DESTDIR =
LIBEXECDIR = /Applications/XAMPP/xamppfiles/modules
CPPFLAGS = -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -DENABLE_DTRACE -DMACOSX -DNDEBUG -DNDEBUG -DENABLE_DTRACE
CFLAGS = -Wc,'-arch i386' -Wc,'-arch x86_64'
LDFLAGS = -Wl,-F/System/Library/Frameworks -framework Python -u _PyMac_Error /System/Library/Frameworks/ -arch i386 -arch x86_64
LDLIBS = -ldl -framework CoreFoundation
all : mod_wsgi.la
mod_wsgi.la : mod_wsgi.c
$(APXS) -c $(CPPFLAGS) $(CFLAGS) mod_wsgi.c $(LDFLAGS) $(LDLIBS)
$(DESTDIR)$(LIBEXECDIR) :
mkdir -p $@
install : all $(DESTDIR)$(LIBEXECDIR)
$(APXS) -i -S LIBEXECDIR=$(DESTDIR)$(LIBEXECDIR) -n 'mod_wsgi' mod_wsgi.la
clean :
-rm -rf .libs
-rm -f mod_wsgi.o mod_wsgi.la mod_wsgi.lo mod_wsgi.slo mod_wsgi.loT
-rm -f config.log config.status
-rm -rf autom4te.cache
distclean : clean
-rm -f Makefile Makefile.in
realclean : distclean
-rm -f configure
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment