aboutsummaryrefslogtreecommitdiffstats
path: root/wlp/C/Makefile
diff options
context:
space:
mode:
authorMatej Cepl <mcepl@redhat.com>2008-02-26 17:27:08 +0100
committerMatej Cepl <mcepl@redhat.com>2008-02-26 17:27:08 +0100
commitc50ce75f2e06b6b8abe49e34775d343b74f7e8cd (patch)
tree14c314e39296b0c3abe781e4dac194949e220136 /wlp/C/Makefile
downloadpygn-0.9.7.tar.gz
The original upstream from Debian orig.tar.gz tarball.0.9.7
Diffstat (limited to 'wlp/C/Makefile')
-rw-r--r--wlp/C/Makefile43
1 files changed, 43 insertions, 0 deletions
diff --git a/wlp/C/Makefile b/wlp/C/Makefile
new file mode 100644
index 0000000..6bc8fc3
--- /dev/null
+++ b/wlp/C/Makefile
@@ -0,0 +1,43 @@
+CC=gcc
+AR=ar
+FLEX=flex
+YACC=bison
+
+CCOPTS=-Wall -ansi
+CCSHARED=-fPIC
+AROPTS=-rs
+FLEXOPTS=
+YACCOPTS=-d
+
+SRCDIR=.
+BINDIR=.
+
+OBJFILE=structs.o commands.tab.o lex.yy.o
+
+all: archive bin
+
+# archive file for python module
+archive: structs bison flex /usr/lib/libfl.a macro.h structs.h commands.tab.h
+ $(AR) $(AROPTS) $(BINDIR)/wlp.a $(OBJFILE) \
+ /usr/lib/libfl.a
+
+# binary (executable) file for testing
+executable: bin
+
+bin: structs bison flex /usr/lib/libfl.a macro.h structs.h commands.tab.h
+ $(CC) $(CCSHARED) $(CCOPTS) $(OBJFILE) \
+ yytest.c /usr/lib/libfl.a -o ./yytest
+
+flex:
+ $(FLEX) $(FLEXOPTS) commands.l
+ $(CC) $(CCSHARED) -c lex.yy.c -o lex.yy.o
+
+bison:
+ $(YACC) $(YACCOPTS) -d commands.y -b commands
+ $(CC) $(CCSHARED) -c commands.tab.c -o commands.tab.o
+
+structs:
+ $(CC) $(CCSHARED) $(CCOPTS) -c structs.c -o structs.o
+
+clean:
+ -rm $(OBJFILE) lex.yy.c commands.tab.h commands.tab.c wlp.a yytest