summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorBalbir Singh <balbir@linux.vnet.ibm.com>2008-04-05 13:33:32 +0000
committerBalbir Singh <balbir@linux.vnet.ibm.com>2008-04-05 13:33:32 +0000
commitf3994cbdfdfdf0d182197e00e8ada9d581e23309 (patch)
tree86adef3313f8238228cb0acec99f100a138f5adb /Makefile
parent9d0502e7c67c556de0ea175dcc4b22f5e6ecc806 (diff)
downloadlibcg-f3994cbdfdfdf0d182197e00e8ada9d581e23309.tar.gz
libcg-f3994cbdfdfdf0d182197e00e8ada9d581e23309.tar.xz
libcg-f3994cbdfdfdf0d182197e00e8ada9d581e23309.zip
Dhaval's API changes, phase 1, prototype
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@4 4f4bb910-9a46-0410-90c8-c897d4f1cd53
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile14
1 files changed, 9 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index a8ad7a1..686396e 100644
--- a/Makefile
+++ b/Makefile
@@ -14,12 +14,13 @@ YACC_DEBUG=-t
DEBUG=-DDEBUG
INC=-I.
CFLAGS=-g -O2 -Wextra $(DEBUG) $(INC)
-LIBS=
+LIBS= -lcg
+LDFLAGS= -L .
-all: cgconfig
+all: cgconfig libcg.so
-cgconfig: config.c y.tab.c lex.yy.c libcg.h file-ops.c
- $(CC) $(CFLAGS) -o $@ y.tab.c lex.yy.c config.c file-ops.c $(LIBS)
+cgconfig: libcg.so config.c y.tab.c lex.yy.c libcg.h file-ops.c
+ $(CXX) $(CFLAGS) -o $@ y.tab.c lex.yy.c config.c file-ops.c $(LDFLAGS) $(LIBS)
y.tab.c: parse.y lex.yy.c
byacc -v -d parse.y
@@ -27,5 +28,8 @@ y.tab.c: parse.y lex.yy.c
lex.yy.c: lex.l
flex lex.l
+libcg.so: api.c libcg.h
+ $(CXX) $(CFLAGS) -shared -fPIC -o $@ api.c
+
clean:
- \rm -f y.tab.c y.tab.h lex.yy.c y.output cgconfig
+ \rm -f y.tab.c y.tab.h lex.yy.c y.output cgconfig libcg.so