aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
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)