diff options
| author | Nima Talebi <nima@autonomy.net.au> | 2009-05-23 18:39:30 +1000 |
|---|---|---|
| committer | Nima Talebi <nima@autonomy.net.au> | 2009-05-23 18:39:30 +1000 |
| commit | 717ff3b75bca054a7f14de43a6ef6fc0535d3953 (patch) | |
| tree | 0cf51391297472399778b8818e3a983f83a636d5 /unit-tests/Makefile | |
| parent | cc76255fecfc9a4168debf1baccd68097d8f7c71 (diff) | |
| download | python-dmidecode-717ff3b75bca054a7f14de43a6ef6fc0535d3953.tar.gz python-dmidecode-717ff3b75bca054a7f14de43a6ef6fc0535d3953.tar.xz python-dmidecode-717ff3b75bca054a7f14de43a6ef6fc0535d3953.zip | |
Expanding the test case to include the POC demo
The POC demo does not actually do much testing yet, other than just
working or not working - but it's in place now for future
enhancements.
Diffstat (limited to 'unit-tests/Makefile')
| -rw-r--r-- | unit-tests/Makefile | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/unit-tests/Makefile b/unit-tests/Makefile new file mode 100644 index 0000000..24fbfa9 --- /dev/null +++ b/unit-tests/Makefile @@ -0,0 +1,33 @@ +## 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 + @echo "==========================================" + @echo " Running proof-of-concept code" + @echo "==========================================" + @echo "" + @python unit + +clean : + rm -f demomodule.so *.{py[oc],o} *~ + |
