summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJ08nY2016-12-21 19:12:01 +0100
committerJ08nY2016-12-21 19:12:01 +0100
commitb91bf574551fe9ac06316123b92d0b6c688c3389 (patch)
tree884a5f4abb61dc1de79fe6510e52d42d7e8105b7
parentc9ae22ccacaa7049131f65f8ea87c1f53ddbc257 (diff)
downloadecgen-b91bf574551fe9ac06316123b92d0b6c688c3389.tar.gz
ecgen-b91bf574551fe9ac06316123b92d0b6c688c3389.tar.zst
ecgen-b91bf574551fe9ac06316123b92d0b6c688c3389.zip
Added Makefile
-rw-r--r--Makefile34
1 files changed, 34 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..1b597df
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,34 @@
+
+CC=gcc
+GP2C=gp2c
+CFLAGS=-g -O3 -Wall
+GP_CFLAGS=-g -O3 -Wall -fomit-frame-pointer -fno-strict-aliasing -fPIC -I"/usr/include/x86_64-linux-gnu"
+STATIC_CFLAGS=-o points.so -shared -g -O3 -Wall -fomit-frame-pointer -fno-strict-aliasing -fPIC -Wl,-shared -Wl,-z,relro points.o -lc -lm -L/usr/lib/x86_64-linux-gnu -lpari
+GPFLAGS=-g
+LIBS=-lpari -lreadline -ltermcap
+
+GP = points.c sea.c
+OBJ = points.o sea.o
+DEPS = points.h sea.h
+
+all: ecgen
+
+ecgen: $(OBJ)
+ $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
+
+gp2c: $(GP)
+
+$(OBJ): $(GP)
+ $(CC) -c -o $@ $< $(GP_CFLAGS)
+
+%.o: %.c
+ $(CC) -c -o $@ $< $(CFLAGS)
+
+%.c: %.gp
+ $(GP2C) -o $(basename $@).gp.c $< $(GPFLAGS)
+ { sed -n '/\/\*End of prototype\*\//q;p'; cat >"$@"; } < $(basename $@).gp.c > $(basename $@).h
+
+.PHONY: clean
+
+clean:
+ rm *.o