Browse Source

add some makefile docs

Steffen Jaeckel 8 years ago
parent
commit
a0e5c2e4ff
2 changed files with 14 additions and 0 deletions
  1. 7 0
      makefile.shared
  2. 7 0
      makefile_include.mk

+ 7 - 0
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

+ 7 - 0
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)