Skip to content
This repository has been archived by the owner on Dec 30, 2019. It is now read-only.

Commit

Permalink
made buildable inside source tree
Browse files Browse the repository at this point in the history
  • Loading branch information
bgilmore committed Apr 9, 2011
1 parent 242df09 commit 7277e28
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 5 deletions.
35 changes: 35 additions & 0 deletions Makefile
@@ -0,0 +1,35 @@
## Makefile for src/mod/python.mod

srcdir = .

# needed for building on OSX
PYTHON_INCLUDE = /System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6
PYTHON_LIB = /usr/lib
REAL_LD = /usr/bin/ld

doofus:
@echo ""
@echo "Let's try this from the right directory..."
@echo ""
@cd ../../../; make

static: ../python.o

modules: ../../../python.$(MOD_EXT)

../python.o: api.o python.o
$(REAL_LD) -o ../python.o -r *.o

../../../python.$(MOD_EXT): ../python.o
$(LD) -L$(PYTHON_LIB) -o ../../../python.$(MOD_EXT) ../python.o -lpython $(XLIBS) $(MODULE_XLIBS)
$(STRIP) ../../../python.$(MOD_EXT)

%.o: %.c
$(CC) $(CFLAGS) $(CPPFLAGS) -I$(PYTHON_INCLUDE) -DMAKING_MODS -c $<

depend:
$(CC) $(CFLAGS) $(CPPFLAGS) -MM *.c > .depend

clean:
@rm -f .depend *.o *.$(MOD_EXT)

1 change: 1 addition & 0 deletions api.c
@@ -1,4 +1,5 @@
#include "api.h"
#include "../module.h"

extern Function *global;
extern int python_isolated;
Expand Down
1 change: 0 additions & 1 deletion api.h
Expand Up @@ -3,7 +3,6 @@

#include <Python.h>
#include "khash.h"
#include "../module.h"

#define MODULE_NAME "python"
#define MODULE_VER_MAJOR 0
Expand Down
4 changes: 0 additions & 4 deletions build.sh

This file was deleted.

1 change: 1 addition & 0 deletions modinfo
@@ -0,0 +1 @@
DESC:Provides support for loading Python modules.
1 change: 1 addition & 0 deletions python.c
Expand Up @@ -29,6 +29,7 @@

#include "api.h"
#include "pymod.h"
#include "../module.h"

#undef global
Function *global = NULL;
Expand Down

0 comments on commit 7277e28

Please sign in to comment.