# -*-Makefile-*-

CC = @CC@
OPT = @OPT@
PYTHON_CFLAGS = @PYTHON_CFLAGS@
PYTHON_INCLUDES = @PYTHON_INCLUDES@
PYTHON_LINK = @PYTHON_LINK@
PYTHON = @PYTHON@
DEFS = @DEFS@
CFLAGS = @CFLAGS@ $(DEFS) $(PYTHON_CFLAGS) $(PYTHON_INCLUDES)
SO = @SO@
LIBS = @LIBS@
PISOCK_LIBS = $(LIBS) @PISOCK_LIBS@

all: pisockmodule$(SO) _Doc$(SO) _pdapalm$(SO)

clean:
	rm -f *.so *.o *~

#pisock_wrap.c: pisock.i
#	swig -python -dnone pisock.i

pisock_wrap.o: pisock_wrap.c
pisockmodule$(SO): pisock_wrap.o
	@rm -f pisock_wrap$(SO)
	$(PYTHON_LINK) pisock_wrap.o $(PISOCK_LIBS)

_Doc.o: _Doc.c
_Doc$(SO): _Doc.o
	@rm -f pisock_wrap$(SO)
	$(PYTHON_LINK) _Doc.o $(LIBS)

_pdapalm.o: _pdapalm.c
_pdapalm$(SO): _pdapalm.o
	@rm -f pisock_wrap$(SO)
	$(PYTHON_LINK) _pdapalm.o $(PISOCK_LIBS)
