Falcon source files (reference implementation)


Makefile

    1 # Build script for the Falcon implementation.
    2 #
    3 # ==========================(LICENSE BEGIN)============================
    4 #
    5 # Copyright (c) 2017  Falcon Project
    6 #
    7 # Permission is hereby granted, free of charge, to any person obtaining
    8 # a copy of this software and associated documentation files (the
    9 # "Software"), to deal in the Software without restriction, including
   10 # without limitation the rights to use, copy, modify, merge, publish,
   11 # distribute, sublicense, and/or sell copies of the Software, and to
   12 # permit persons to whom the Software is furnished to do so, subject to
   13 # the following conditions:
   14 #
   15 # The above copyright notice and this permission notice shall be
   16 # included in all copies or substantial portions of the Software.
   17 #
   18 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
   19 # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
   20 # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
   21 # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
   22 # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
   23 # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
   24 # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
   25 #
   26 # ===========================(LICENSE END)=============================
   27 #
   28 # @author   Thomas Pornin <thomas.pornin@nccgroup.trust>
   29 
   30 .POSIX:
   31 
   32 CC = c99
   33 CFLAGS = -W -Wall -O #-pg -fno-pie
   34 LD = c99
   35 LDFLAGS = #-pg -no-pie
   36 LDLIBS = -lm
   37 
   38 OBJ = falcon-enc.o falcon-vrfy.o frng.o shake.o falcon-fft.o falcon-keygen.o falcon-sign.o
   39 
   40 all: test_falcon falcon
   41 
   42 clean:
   43         -rm -f $(OBJ) test_falcon test_falcon.o falcon tool.o
   44 
   45 test_falcon: test_falcon.o $(OBJ)
   46         $(LD) $(LDFLAGS) -o test_falcon test_falcon.o $(OBJ) $(LDLIBS)
   47 
   48 falcon: tool.o $(OBJ)
   49         $(LD) $(LDFLAGS) -o falcon tool.o $(OBJ) $(LDLIBS)
   50 
   51 test_falcon.o: test_falcon.c falcon.h internal.h fpr-double.h shake.h
   52         $(CC) $(CFLAGS) -c -o test_falcon.o test_falcon.c
   53 
   54 tool.o: tool.c falcon.h
   55         $(CC) $(CFLAGS) -c -o tool.o tool.c
   56 
   57 falcon-enc.o: falcon-enc.c falcon.h internal.h fpr-double.h shake.h
   58         $(CC) $(CFLAGS) -c -o falcon-enc.o falcon-enc.c
   59 
   60 falcon-fft.o: falcon-fft.c falcon.h internal.h fpr-double.h shake.h
   61         $(CC) $(CFLAGS) -c -o falcon-fft.o falcon-fft.c
   62 
   63 falcon-keygen.o: falcon-keygen.c falcon.h internal.h fpr-double.h shake.h
   64         $(CC) $(CFLAGS) -c -o falcon-keygen.o falcon-keygen.c
   65 
   66 falcon-sign.o: falcon-sign.c falcon.h internal.h fpr-double.h shake.h
   67         $(CC) $(CFLAGS) -c -o falcon-sign.o falcon-sign.c
   68 
   69 falcon-vrfy.o: falcon-vrfy.c falcon.h internal.h fpr-double.h shake.h
   70         $(CC) $(CFLAGS) -c -o falcon-vrfy.o falcon-vrfy.c
   71 
   72 frng.o: frng.c falcon.h internal.h fpr-double.h shake.h
   73         $(CC) $(CFLAGS) -c -o frng.o frng.c
   74 
   75 shake.o: shake.c shake.h
   76         $(CC) $(CFLAGS) -c -o shake.o shake.c