diff options
author | Matěj Cepl <mcepl@cepl.eu> | 2014-12-15 16:56:56 +0000 |
---|---|---|
committer | Matěj Cepl <mcepl@cepl.eu> | 2014-12-15 16:56:56 +0000 |
commit | 02c305343ba1e25864b77c0381f8bc768927e4a7 (patch) | |
tree | 372844320f2abac1579636198d36ec3a6e7d34eb /wlp/Makefile.C | |
parent | c1098b321415976df7b6fc77117046b3b515885d (diff) | |
parent | f65b8f618ed0b59f0c2c14321bbfa9de8e802169 (diff) | |
download | pygn-02c305343ba1e25864b77c0381f8bc768927e4a7.tar.gz |
Merge branch 'testsuite' into 'master'
Testsuite
Hopefully this makes my pyg fork presentable.
See merge request !1
Diffstat (limited to 'wlp/Makefile.C')
-rw-r--r-- | wlp/Makefile.C | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/wlp/Makefile.C b/wlp/Makefile.C new file mode 100644 index 0000000..0c962e6 --- /dev/null +++ b/wlp/Makefile.C @@ -0,0 +1,61 @@ +DESTDIR= +LIBDIR=/usr/lib64 +BINDIR=/usr/bin +PYGLIBDIR=$(DESTDIR)/$(LIBDIR)/pyg +PYGBINDIR=$(DESTDIR)/$(BINDIR) + +CC=gcc +AR=ar +FLEX=flex +YACC=bison + +CCOPTS=-Wall -ansi +CCSHARED=-fPIC +AROPTS=-rs +FLEXOPTS= +YACCOPTS=-d + +#CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS) +CPPFLAGS:= +# Add more -I and -D options here +## CFLAGS=$(OPT) -I$(INCLUDEPY) -I$(EXECINCLUDEPY) $(DEFS) $(shell dpkg-buildflags --get CFLAGS) +OPTFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 +OPTFLAGS+=-grecord-gcc-switches -m64 -mtune=generic +CFLAGS=$(OPTFLAGS) +CXXFLAGS:=$(OPTFLAGS) +OPTLDFLAGS=-Wl,-z,relro +#LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS) +LDFLAGS:=$(OPTLDFLAGS) + +SRCDIR=. +BINDIR=. + +OBJFILE=structs.o commands.tab.o lex.yy.o + +all: archive bin + +# archive file for python module +archive: structs bison flex macro.h structs.h commands.tab.h + mkdir -p $(PYGLIBDIR) + $(AR) $(AROPTS) $(PYGLIBDIR)/wlp.a $(OBJFILE) + +# binary (executable) file for testing +executable: bin + +bin: structs bison flex macro.h structs.h commands.tab.h + $(CC) $(CCSHARED) $(CCOPTS) $(OBJFILE) \ + yytest.c $(PYGLIBDIR)/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 -f $(OBJFILE) lex.yy.c commands.tab.h commands.tab.c wlp.a yytest |