aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJ08nY2017-02-05 03:59:52 +0100
committerJ08nY2017-02-05 03:59:52 +0100
commit763fc80153c5e9287f1b0f0609b11fb4f50c90ab (patch)
tree5cd6e7acc4512cca65bcc16a74f3b63879b2d3bc /Makefile
parent3d9bf583ccc5eea61c5f78f52d1e2073daee924c (diff)
downloadecgen-763fc80153c5e9287f1b0f0609b11fb4f50c90ab.tar.gz
ecgen-763fc80153c5e9287f1b0f0609b11fb4f50c90ab.tar.zst
ecgen-763fc80153c5e9287f1b0f0609b11fb4f50c90ab.zip
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile52
1 files changed, 10 insertions, 42 deletions
diff --git a/Makefile b/Makefile
index a32a853..80cad13 100644
--- a/Makefile
+++ b/Makefile
@@ -1,45 +1,13 @@
+#
+# ecgen, tool for generating Elliptic curve domain parameters
+# Copyright (C) 2017 J08nY
+#
-CC=gcc
-GP2C=gp2c
+# Default target first
+all:
+ +$(MAKE) -C src all
-INCLUDES=-I.
+# Just pass all targets to a Makefile in src
+$(MAKECMDGOALS):
+ +$(MAKE) -C src $@
-CFLAGS=$(INCLUDES) -g -O3 -Wall
-GP_CFLAGS=$(INCLUDES) -g -O3 -Wall -fomit-frame-pointer -fno-strict-aliasing -fPIC
-GPFLAGS=-g
-
-LIBS=-lpari -lreadline -ltermcap
-
-GP = gp
-GPC = $(addsuffix .c, $(GP))
-GPO = $(addsuffix .o, $(GP))
-GPH = $(addsuffix .h, $(GP))
-
-all: ecgen
-
-ecgen: ecgen.o $(GPO)
- $(CC) $(CFLAGS) -o $@ $^ $(LIBS)
-
-gp2c: $(GPC) $(GPH)
-
-$(GPO): $(GPC) $(GPH)
- $(CC) $(GP_CFLAGS) -c -o $@ $< $(LIBS)
-
-%.o: %.c $(GPH)
- $(CC) $(CFLAGS) -c -o $@ $< $(LIBS)
-
-%.h %.c: %.gp
- $(GP2C) $*.gp $(GPFLAGS) 2>/dev/null | { sed -u '/\/\*End of prototype\*\//q' >"$*.h"; echo '#include "$*.h"' >"$*.c"; cat >>"$*.c"; }
-
-.PHONY: clean-all clean clean-gp
-
-clean-all: clean clean-gp
-
-clean:
- rm -f ecgen
- rm -f *.o
-
-clean-gp:
- rm -f $(GPH)
- rm -f $(GPC)
- rm -f $(GPO)