diff options
author | nima <nima@abc39116-655e-4be6-ad55-d661dc543056> | 2008-10-31 14:45:34 +0000 |
---|---|---|
committer | nima <nima@abc39116-655e-4be6-ad55-d661dc543056> | 2008-10-31 14:45:34 +0000 |
commit | b0103d72736fdf47760049dbf880a859b52c88fa (patch) | |
tree | dcbe335d2aa95930c7d68ab0f853fa6d6d20d66d | |
parent | f173034b410e82cfd69d702ed862b4964beb4cd6 (diff) | |
download | python-dmidecode-b0103d72736fdf47760049dbf880a859b52c88fa.tar.gz python-dmidecode-b0103d72736fdf47760049dbf880a859b52c88fa.tar.xz python-dmidecode-b0103d72736fdf47760049dbf880a859b52c88fa.zip |
Changed default target of Makefile back to `setup.py' method of installation.
git-svn-id: svn://svn.autonomy.net.au/python-dmidecode@107 abc39116-655e-4be6-ad55-d661dc543056
-rw-r--r-- | Makefile | 39 |
1 files changed, 16 insertions, 23 deletions
@@ -9,7 +9,6 @@ PY := $(shell python -V 2>&1 |sed -e 's/.\(ython\) \(2\.[0-9]\)\..*/p\1\2/') CC := gcc RM := rm -f - CFLAGS = -g -D_XOPEN_SOURCE=600 CFLAGS += -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-align CFLAGS += -Wwrite-strings -Wmissing-prototypes -Winline -Wundef #-Wcast-qual @@ -19,17 +18,22 @@ CFLAGS += -O3 #CFLAGS += -DNDEBUG #CFLAGS += -DBIGENDIAN #CFLAGS += -DALIGNMENT_WORKAROUND - #LDFLAGS = -lefence LDFLAGS = - SOFLAGS = -pthread -shared -L/home/nima/dev-room/projects/dmidecode -lutil +SO = /usr/lib/$(PY)/site-packages/dmidecode.so + + +############################################################################### +install: build + $(PY) setup.py install + +build: + $(PY) setup.py build -# -# Shared Objects -# -/usr/lib/$(PY)/site-packages/dmidecode.so: libdmidecode.so +############################################################################### +SO: libdmidecode.so cp $< $@ nm -u $@ @@ -51,26 +55,15 @@ util.o: util.c types.h util.h config.h dmioem.o: dmioem.c types.h dmidecode.h dmioem.h $(CC) $(CFLAGS) -c -o $@ $< -dmidecodemodule: - $(PY) setup.py build -install: - $(PY) setup.py install +############################################################################### uninstall: - -install-doc : - $(INSTALL_DIR) $(DESTDIR)$(docdir) - $(INSTALL_DATA) README $(DESTDIR)$(docdir) - $(INSTALL_DATA) CHANGELOG $(DESTDIR)$(docdir) - $(INSTALL_DATA) AUTHORS $(DESTDIR)$(docdir) - -uninstall-doc : - $(RM) -r $(DESTDIR)$(docdir) + rm -f $(SO) clean : $(PY) setup.py clean - $(RM) *.so *.o $(PROGRAMS) core - rm -rf build + -$(RM) *.so *.o core + -rm -rf build -.PHONY: install clean module all +.PHONY: install clean uninstall module |