From a0e5c2e4ff2e790800550f9e1d148bee5028bd7f Mon Sep 17 00:00:00 2001 From: Steffen Jaeckel Date: Tue, 13 Jun 2017 14:57:07 +0200 Subject: [PATCH] add some makefile docs --- makefile.shared | 7 +++++++ makefile_include.mk | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/makefile.shared b/makefile.shared index 0e9e6bc..a36e86e 100644 --- a/makefile.shared +++ b/makefile.shared @@ -7,6 +7,13 @@ # # (GNU make only) +### USAGE: +# +# CFLAGS="-DUSE_LTM -DLTM_DESC -I/path/to/libtommath" make -f makefile.shared all EXTRALIBS=/path/to/libtommath/libtommath.a +# ./test +# make -f makefile.shared DESTDIR=/opt/libtom install +# + PLATFORM := $(shell uname | sed -e 's/_.*//') ifndef LT diff --git a/makefile_include.mk b/makefile_include.mk index 78b70bc..08086f5 100644 --- a/makefile_include.mk +++ b/makefile_include.mk @@ -43,6 +43,11 @@ endif # # Compilation flags. Note the += does not write over the user's CFLAGS! # +# Also note that we're extending the environments' CFLAGS. +# If you think that our CFLAGS are not nice you can easily override them +# by giving them as a parameter to make: +# make CFLAGS="-I./src/headers/ -DLTC_SOURCE ..." ... +# CFLAGS += -I./src/headers/ -Wall -Wsign-compare -Wshadow -DLTC_SOURCE ifdef OLD_GCC @@ -338,6 +343,8 @@ $(TOBJECTS): $(HEADERS) $(THEADERS) bins: $(USEFUL_DEMOS) +all: all_test + all_test: test $(UNBROKEN_DEMOS) #build the doxy files (requires Doxygen, tetex and patience)