#!/bin/bash #$Header$ #******************************************************************************** #Copyright (c) 2003, 2018 David T. Ashley. #******************************************************************************** #This file is part of "arith_large_cgi", a program that is designed to be #invoked by a PHP script as part of serving a web page that performs #calculations involving large integers. (A secondary compiled program is #used because a compiled program can perform certain calculation-intensive #tasks far more efficiently than a PHP script.) This program is provided by #David T. Ashley (dashley@gmail.com) under the MIT License (reproduced #immediately below). #******************************************************************************** #Permission is hereby granted, free of charge, to any person obtaining a copy #of this software and associated documentation files (the "Software"), to deal #in the Software without restriction, including without limitation the rights #to use, copy, modify, merge, publish, distribute, sublicense, and/or sell #copies of the Software, and to permit persons to whom the Software is #furnished to do so, subject to the following conditions: # #The above copyright notice and this permission notice shall be included in all #copies or substantial portions of the Software. # #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, #FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE #AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER #LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, #OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE #SOFTWARE. #******************************************************************************** #This BASH script just builds the executable. If there is any trouble in porting the #executable, it might be wise to use the -static option on the compile. # #Build the general purpose auxiliary CGI-BIN which gives data to the script. gcc -Wimplicit -static -o dtats_cgi_aux_arith_large \ dtats_cgi_aux_arith_large.c auxfuncs.c cf_decomp.c \ rat_num.c sieve_eratosthenes.c subfunc_cfbrap.c \ subfunc_gcd.c subfunc_gmp_prob_prime.c \ subfunc_pfact_18.c -lgmp # #Copy the executable to the right location. cp dtats_cgi_aux_arith_large /hl/cgibin/aux_progs # #******************************************************************************** #End of file BUILD. #********************************************************************************