# This is a sample makefile that can be used to compile programs using 
# an installed version of NTL.
# Using this ensures that your programs compile with flags consistent
# with the build, and link to the right libraries.
#
# The basic functionality provided by this makefile is to allow
# you to compile 'foo.cpp' into the executable file 'foo' by executing
#    make foo   
# You can adapt this to the needs of your own project as necessary.


.cpp:
	/home/builder/.termux-build/_cache/android-r29-api-24-v4/bin/x86_64-linux-android-clang++ -I/data/data/com.termux/files/usr/include   -fstack-protector-strong -Oz -pthread -L/data/data/com.termux/files/usr/lib -Wl,-rpath=/data/data/com.termux/files/usr/lib -Wl,--enable-new-dtags -Wl,--as-needed -Wl,-z,relro,-z,now $< -o $@  -L/data/data/com.termux/files/usr/lib   -lntl -L/data/data/com.termux/files/usr/lib  -Wl,-rpath,/data/data/com.termux/files/usr/lib -lgmp     -lm

# ntl was installed as a static library with dependencies: gmp

# COMPILER OPTIONS
# "-I/data/data/com.termux/files/usr/include" ensures ntl header files found at compile time
# "-pthread" enables multi-threading (also needed for linking)
# "$<" expands to "foo.cpp" when run as "make foo"

# LINKER OPTIONS
# "-o $@" expands to "-o foo" when run as "make foo"
# "-L/data/data/com.termux/files/usr/lib" ensures ntl is found at link time
# "-lntl" ensures that program will link to ntl
# "-L/data/data/com.termux/files/usr/lib" ensures that gmp is found at link time
# "-Wl,-rpath,/data/data/com.termux/files/usr/lib" ensures gmp is found at runtime
#    if it is a shared lib
#    alternatively, add /data/data/com.termux/files/usr/lib to LD_LIBRARY_PATH
# "-lgmp" ensures that program will link to gmp
