AI Libraries for Panda3D

Looks great, amazing job!

Here’s a makefile for non-windows users. Simply adjust the paths at the top of the makefile, place it (with the name “Makefile”) inside the “Code” directory of the source archive and hit “make install”. If the compilation went well, you should be able to use it now.

PANDA3D_INCDIR := /usr/include/panda3d/
PANDA3D_LIBDIR := /usr/lib/panda3d/
PANDA3D_LIBS   := -lpanda
PYTHON_VERSION := python2.6
PYTHON_INCDIR  := /usr/include/$(PYTHON_VERSION)

HEADERS := $(wildcard *.h)
OBJS := $(patsubst %.cxx, %.o, $(wildcard *.cxx)) pandaai_igate.o

all: libpandaai.so
pandaai_igate.cxx: $(HEADERS)
	interrogate -S$(PANDA3D_INCDIR)/parser-inc -I$(PANDA3D_INCDIR) -oc pandaai_igate.cxx -Dvolatile -Dmutable -DCPPPARSER -D__STDC__=1 -D__cplusplus -D__inline -D__const=const -fnames -string -refcount -assert -python-native -do-module -module libpandaai -library libpandaai $(HEADERS)
%.o: %.cxx
	g++ -c -o $@ $< -fPIC -I. -I$(PANDA3D_INCDIR) -I$(PYTHON_INCDIR)
libpandaai.so: $(OBJS)
	g++ -shared -o $@ $(OBJS) -L$(PANDA3D_LIBDIR) $(PANDA3D_LIBS)
clean:
	rm -f $(OBJS) pandaai_igate.cxx libpandaai.so
test: libpandaai.so
	$(PYTHON_VERSION) -c "import libpandaai"
install: libpandaai.so
	cp libpandaai.so /usr/local/lib/libpandaai.so
uninstall:
	rm /usr/local/lib/libpandaai.so
.PHONY: all test clean install uninstall

– pro-rsoft