summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorBalbir Singh <balbir@linux.vnet.ibm.com>2008-04-10 11:56:33 +0000
committerBalbir Singh <balbir@linux.vnet.ibm.com>2008-04-10 11:56:33 +0000
commit31f116d4e2842da4929e7bb7e6187c3d9259422c (patch)
tree2d112a04cd7b4d3b137bbb1ac51b28aa180889c6 /Makefile
parent95a73795a8dc1dcd3888150bbafc52254296ab3c (diff)
downloadlibcg-31f116d4e2842da4929e7bb7e6187c3d9259422c.tar.gz
libcg-31f116d4e2842da4929e7bb7e6187c3d9259422c.tar.xz
libcg-31f116d4e2842da4929e7bb7e6187c3d9259422c.zip
Miscellaneous changes, some coding style fixes and refactoring of code.
Also added a install/uninstall target Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/branches/balbir@9 4f4bb910-9a46-0410-90c8-c897d4f1cd53
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 9 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index ec2142b..9c175fa 100644
--- a/Makefile
+++ b/Makefile
@@ -16,6 +16,7 @@ INC=-I.
CFLAGS=-g -O2 -Wextra $(DEBUG) $(INC)
LIBS= -lcg
LDFLAGS= -L .
+INSTALLPREFIX=
all: cgconfig libcg.so
@@ -31,5 +32,13 @@ lex.yy.c: lex.l
libcg.so: api.c libcg.h
$(CXX) $(CFLAGS) -shared -fPIC -o $@ api.c
+install: libcg.so
+ \cp libcg.h $(INSTALLPREFIX)/usr/include
+ \cp libcg.so $(INSTALLPREFIX)/usr/lib
+
+uninstall: libcg.so
+ \rm $(INSTALLPREFIX)/usr/include/libcg.h
+ \rm $(INSTALLPREFIX)/usr/lib/libcg.so
+
clean:
\rm -f y.tab.c y.tab.h lex.yy.c y.output cgconfig libcg.so