summaryrefslogtreecommitdiffstats
path: root/unit-tests/Makefile
blob: 01706a318de9b59549dea5c723c4bcf03c6ec437 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
## This one is important to get right ...
## We need to link in the libxml2mod.so file from here
PYLIBDIR := /usr/lib64/python2.5/site-packages
PYLIBDIR := /usr/lib/python-support/python-libxml2/python2.5

# Defaults, should be fine
CFLAGS=-I. $(shell xml2-config --cflags) -g -Wall $(shell python-config --cflags)

LIBS=$(shell xml2-config --libs) -lxml2mod $(shell python-config --libs)
LIBDIR=-L $(PYLIBDIR)

.SUFFIX=.c .o .so

all : test

demomodule.so : demo.o dmixml.o
	@echo "Linking: $@"
	@gcc -fPIC --shared -o $@ $^ $(LIBS) $(LIBDIR)

.c.o :
	@echo "Compiling $<"
	@gcc -fPIC -c $< $(CFLAGS)

#test : demomodule.so
test :
	@echo "=========================================="
	@echo " Running proof-of-concept code"
	@echo "=========================================="
	@echo ""
	@python unit

clean :
	rm -f *.{py[oc],o,so} *~