Gavin Howard | 27fa9cd | 2018-12-12 02:52:52 -0700 | [diff] [blame] | 1 | # |
| 2 | # Copyright 2018 Gavin D. Howard |
| 3 | # |
| 4 | # Permission to use, copy, modify, and/or distribute this software for any |
| 5 | # purpose with or without fee is hereby granted. |
| 6 | # |
| 7 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH |
| 8 | # REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY |
| 9 | # AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, |
| 10 | # INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM |
| 11 | # LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR |
| 12 | # OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
| 13 | # PERFORMANCE OF THIS SOFTWARE. |
| 14 | # |
Gavin Howard | b55ad00 | 2018-12-20 16:59:23 -0700 | [diff] [blame] | 15 | # %%WARNING%% |
| 16 | # |
Gavin Howard | 27fa9cd | 2018-12-12 02:52:52 -0700 | [diff] [blame] | 17 | .POSIX: |
| 18 | |
| 19 | SRC = %%SRC%% |
| 20 | OBJ = %%OBJ%% |
| 21 | GCDA = %%GCDA%% |
| 22 | GCNO = %%GCNO%% |
| 23 | |
| 24 | BC_SRC = %%BC_SRC%% |
| 25 | BC_OBJ = %%BC_OBJ%% |
| 26 | BC_GCDA = %%BC_GCDA%% |
| 27 | BC_GCNO = %%BC_GCNO%% |
| 28 | |
| 29 | DC_SRC = %%DC_SRC%% |
| 30 | DC_OBJ = %%DC_OBJ%% |
| 31 | DC_GCDA = %%DC_GCDA%% |
| 32 | DC_GCNO = %%DC_GCNO%% |
| 33 | |
Gavin Howard | bf81339 | 2018-12-20 10:49:00 -0700 | [diff] [blame] | 34 | HISTORY_SRC = %%HISTORY_SRC%% |
| 35 | HISTORY_OBJ = %%HISTORY_OBJ%% |
| 36 | HISTORY_GCDA = %%HISTORY_GCDA%% |
| 37 | HISTORY_GCNO = %%HISTORY_GCNO%% |
| 38 | |
Gavin Howard | 27fa9cd | 2018-12-12 02:52:52 -0700 | [diff] [blame] | 39 | BC_ENABLED_NAME = BC_ENABLED |
| 40 | BC_ENABLED = %%BC_ENABLED%% |
| 41 | DC_ENABLED_NAME = DC_ENABLED |
| 42 | DC_ENABLED = %%DC_ENABLED%% |
| 43 | |
Gavin Howard | c0d4593 | 2019-01-04 13:28:44 -0700 | [diff] [blame] | 44 | VERSION = 1.1-dev |
Gavin Howard | 27fa9cd | 2018-12-12 02:52:52 -0700 | [diff] [blame] | 45 | |
| 46 | GEN_DIR = gen |
| 47 | GEN = strgen |
| 48 | GEN_EXEC = $(GEN_DIR)/$(GEN) |
| 49 | GEN_C = $(GEN_DIR)/$(GEN).c |
| 50 | |
Gavin Howard | 4dff545 | 2018-12-20 10:06:58 -0700 | [diff] [blame] | 51 | GEN_EMU = %%GEN_EMU%% |
| 52 | |
Gavin Howard | 27fa9cd | 2018-12-12 02:52:52 -0700 | [diff] [blame] | 53 | BC_LIB = $(GEN_DIR)/lib.bc |
| 54 | BC_LIB_C = $(GEN_DIR)/lib.c |
Gavin Howard | a1cd122 | 2019-01-02 14:40:46 -0700 | [diff] [blame] | 55 | BC_LIB_O = %%BC_LIB_O%% |
Gavin Howard | aba12e7 | 2019-01-07 17:48:27 -0700 | [diff] [blame] | 56 | BC_LIB_GCDA = $(GEN_DIR)/lib.gcda |
| 57 | BC_LIB_GCNO = $(GEN_DIR)/lib.gcno |
Gavin Howard | 27fa9cd | 2018-12-12 02:52:52 -0700 | [diff] [blame] | 58 | |
Gavin Howard | 6fcb504 | 2018-12-26 17:44:06 -0700 | [diff] [blame] | 59 | BC_LIB2 = $(GEN_DIR)/lib2.bc |
| 60 | BC_LIB2_C = $(GEN_DIR)/lib2.c |
Gavin Howard | 9fbeaa8 | 2018-12-27 18:13:28 -0700 | [diff] [blame] | 61 | BC_LIB2_O = %%BC_LIB2_O%% |
Gavin Howard | aba12e7 | 2019-01-07 17:48:27 -0700 | [diff] [blame] | 62 | BC_LIB2_GCDA = $(GEN_DIR)/lib2.gcda |
| 63 | BC_LIB2_GCNO = $(GEN_DIR)/lib2.gcno |
Gavin Howard | 6fcb504 | 2018-12-26 17:44:06 -0700 | [diff] [blame] | 64 | |
Gavin Howard | 27fa9cd | 2018-12-12 02:52:52 -0700 | [diff] [blame] | 65 | BC_HELP = $(GEN_DIR)/bc_help.txt |
| 66 | BC_HELP_C = $(GEN_DIR)/bc_help.c |
Gavin Howard | a1cd122 | 2019-01-02 14:40:46 -0700 | [diff] [blame] | 67 | BC_HELP_O = %%BC_HELP_O%% |
Gavin Howard | aba12e7 | 2019-01-07 17:48:27 -0700 | [diff] [blame] | 68 | BC_HELP_GCDA = $(GEN_DIR)/bc_help.gcda |
| 69 | BC_HELP_GCNO = $(GEN_DIR)/bc_help.gcno |
Gavin Howard | 27fa9cd | 2018-12-12 02:52:52 -0700 | [diff] [blame] | 70 | |
| 71 | DC_HELP = $(GEN_DIR)/dc_help.txt |
| 72 | DC_HELP_C = $(GEN_DIR)/dc_help.c |
Gavin Howard | a1cd122 | 2019-01-02 14:40:46 -0700 | [diff] [blame] | 73 | DC_HELP_O = %%DC_HELP_O%% |
Gavin Howard | aba12e7 | 2019-01-07 17:48:27 -0700 | [diff] [blame] | 74 | DC_HELP_GCDA = $(GEN_DIR)/dc_help.gcda |
| 75 | DC_HELP_GCNO = $(GEN_DIR)/dc_help.gcno |
Gavin Howard | 27fa9cd | 2018-12-12 02:52:52 -0700 | [diff] [blame] | 76 | |
| 77 | BIN = bin |
| 78 | |
| 79 | BC = bc |
| 80 | DC = dc |
| 81 | BC_EXEC = $(BIN)/$(BC) |
| 82 | DC_EXEC = $(BIN)/$(DC) |
| 83 | |
| 84 | PREFIX = %%PREFIX%% |
| 85 | DESTDIR = %%DESTDIR%% |
| 86 | BC_ENABLE_SIGNALS = %%SIGNALS%% |
| 87 | BC_ENABLE_HISTORY = %%HISTORY%% |
Gavin Howard | c868e09 | 2018-12-21 13:39:32 -0700 | [diff] [blame] | 88 | BC_ENABLE_REFERENCES = %%REFERENCES%% |
Gavin Howard | 6fcb504 | 2018-12-26 17:44:06 -0700 | [diff] [blame] | 89 | BC_ENABLE_EXTRA_MATH_NAME = BC_ENABLE_EXTRA_MATH |
| 90 | BC_ENABLE_EXTRA_MATH = %%EXTRA_MATH%% |
Gavin Howard | 27fa9cd | 2018-12-12 02:52:52 -0700 | [diff] [blame] | 91 | |
Gavin Howard | c6547d6 | 2018-12-19 12:52:08 -0700 | [diff] [blame] | 92 | RM = rm |
Gavin Howard | 7ff15ae | 2018-12-20 10:28:23 -0700 | [diff] [blame] | 93 | MKDIR = mkdir |
| 94 | |
Gavin Howard | 27fa9cd | 2018-12-12 02:52:52 -0700 | [diff] [blame] | 95 | INSTALL = ./install.sh |
| 96 | LINK = ./link.sh |
| 97 | KARATSUBA = ./karatsuba.py |
| 98 | |
Gavin Howard | d4fece3 | 2019-01-08 02:06:22 -0700 | [diff] [blame] | 99 | VALGRIND_ARGS = --error-exitcode=1 --leak-check=full --show-leak-kinds=all --errors-for-leak-kinds=all |
Gavin Howard | 27fa9cd | 2018-12-12 02:52:52 -0700 | [diff] [blame] | 100 | |
Gavin Howard | 27fa9cd | 2018-12-12 02:52:52 -0700 | [diff] [blame] | 101 | BC_NUM_KARATSUBA_LEN = %%KARATSUBA_LEN%% |
| 102 | |
Gavin Howard | abbb290 | 2018-12-20 10:10:15 -0700 | [diff] [blame] | 103 | CPPFLAGS1 = %%CPPFLAGS%% |
| 104 | CPPFLAGS2 = $(CPPFLAGS1) -D$(BC_ENABLED_NAME)=$(BC_ENABLED) -D$(DC_ENABLED_NAME)=$(DC_ENABLED) |
| 105 | CPPFLAGS3 = $(CPPFLAGS2) -I./include/ -D_POSIX_C_SOURCE=200809L -DVERSION=$(VERSION) |
| 106 | CPPFLAGS4 = $(CPPFLAGS3) -DBC_NUM_KARATSUBA_LEN=$(BC_NUM_KARATSUBA_LEN) |
Gavin Howard | c868e09 | 2018-12-21 13:39:32 -0700 | [diff] [blame] | 107 | CPPFLAGS5 = $(CPPFLAGS4) -DBC_ENABLE_REFERENCES=$(BC_ENABLE_REFERENCES) |
Gavin Howard | 8725070 | 2018-12-31 15:49:33 -0700 | [diff] [blame] | 108 | CPPFLAGS6 = $(CPPFLAGS5) -D$(BC_ENABLE_EXTRA_MATH_NAME)=$(BC_ENABLE_EXTRA_MATH) |
Gavin Howard | b041659 | 2019-01-04 09:47:50 -0700 | [diff] [blame] | 109 | CPPFLAGS = $(CPPFLAGS6) -DBC_ENABLE_SIGNALS=$(BC_ENABLE_SIGNALS) -DBC_ENABLE_HISTORY=$(BC_ENABLE_HISTORY) |
Gavin Howard | abbb290 | 2018-12-20 10:10:15 -0700 | [diff] [blame] | 110 | CFLAGS = $(CPPFLAGS) %%CFLAGS%% |
Gavin Howard | 27fa9cd | 2018-12-12 02:52:52 -0700 | [diff] [blame] | 111 | LDFLAGS = %%LDFLAGS%% |
| 112 | |
Gavin Howard | 593a518 | 2019-01-17 10:22:45 -0700 | [diff] [blame^] | 113 | HOSTCFLAGS = %%HOSTCFLAGS%% |
| 114 | |
Gavin Howard | 27fa9cd | 2018-12-12 02:52:52 -0700 | [diff] [blame] | 115 | CC = %%CC%% |
| 116 | HOSTCC = %%HOSTCC%% |
| 117 | |
Gavin Howard | 78bff70 | 2019-01-01 10:31:10 -0700 | [diff] [blame] | 118 | all: make_bin $(DC_HELP_O) $(BC_HELP_O) $(BC_LIB_O) $(BC_LIB2_O) $(BC_LIB3_O) $(BC_OBJ) $(DC_OBJ) $(HISTORY_OBJ) $(OBJ) |
| 119 | $(CC) $(CPPFLAGS) $(CFLAGS) $(OBJ) $(DC_OBJ) $(BC_OBJ) $(HISTORY_OBJ) $(BC_HELP_O) $(DC_HELP_O) \ |
| 120 | $(BC_LIB_O) $(BC_LIB2_O) $(BC_LIB3_O) $(LDFLAGS) -o $(%%MAIN_EXEC%%) |
Gavin Howard | 27fa9cd | 2018-12-12 02:52:52 -0700 | [diff] [blame] | 121 | %%LINK%% |
| 122 | |
| 123 | $(GEN_EXEC): |
Gavin Howard | 593a518 | 2019-01-17 10:22:45 -0700 | [diff] [blame^] | 124 | $(HOSTCC) $(HOSTCFLAGS) -o $(GEN_EXEC) $(GEN_C) |
Gavin Howard | 27fa9cd | 2018-12-12 02:52:52 -0700 | [diff] [blame] | 125 | |
| 126 | $(BC_LIB_C): $(GEN_EXEC) $(BC_LIB) |
Gavin Howard | 1cbfe24 | 2019-01-09 17:13:11 -0700 | [diff] [blame] | 127 | $(GEN_EMU) $(GEN_EXEC) $(BC_LIB) $(BC_LIB_C) bc_lib bc.h bc_lib_name $(BC_ENABLED_NAME) 1 |
Gavin Howard | 27fa9cd | 2018-12-12 02:52:52 -0700 | [diff] [blame] | 128 | |
Gavin Howard | 6fcb504 | 2018-12-26 17:44:06 -0700 | [diff] [blame] | 129 | $(BC_LIB2_C): $(GEN_EXEC) $(BC_LIB2) |
Gavin Howard | 1cbfe24 | 2019-01-09 17:13:11 -0700 | [diff] [blame] | 130 | $(GEN_EMU) $(GEN_EXEC) $(BC_LIB2) $(BC_LIB2_C) bc_lib2 bc.h bc_lib2_name \ |
Gavin Howard | 6fcb504 | 2018-12-26 17:44:06 -0700 | [diff] [blame] | 131 | "$(BC_ENABLED_NAME) && $(BC_ENABLE_EXTRA_MATH_NAME)" 1 |
| 132 | |
Gavin Howard | 27fa9cd | 2018-12-12 02:52:52 -0700 | [diff] [blame] | 133 | $(BC_HELP_C): $(GEN_EXEC) $(BC_HELP) |
Gavin Howard | 1cbfe24 | 2019-01-09 17:13:11 -0700 | [diff] [blame] | 134 | $(GEN_EMU) $(GEN_EXEC) $(BC_HELP) $(BC_HELP_C) bc_help bc.h "" $(BC_ENABLED_NAME) |
Gavin Howard | 27fa9cd | 2018-12-12 02:52:52 -0700 | [diff] [blame] | 135 | |
| 136 | $(DC_HELP_C): $(GEN_EXEC) $(DC_HELP) |
Gavin Howard | 1cbfe24 | 2019-01-09 17:13:11 -0700 | [diff] [blame] | 137 | $(GEN_EMU) $(GEN_EXEC) $(DC_HELP) $(DC_HELP_C) dc_help dc.h "" $(DC_ENABLED_NAME) |
Gavin Howard | 27fa9cd | 2018-12-12 02:52:52 -0700 | [diff] [blame] | 138 | |
| 139 | make_bin: |
Gavin Howard | 7ff15ae | 2018-12-20 10:28:23 -0700 | [diff] [blame] | 140 | $(MKDIR) -p $(BIN) |
Gavin Howard | 27fa9cd | 2018-12-12 02:52:52 -0700 | [diff] [blame] | 141 | |
| 142 | help: |
Gavin Howard | d15e01d | 2018-12-19 12:49:02 -0700 | [diff] [blame] | 143 | @printf 'available targets:\n' |
| 144 | @printf '\n' |
| 145 | @printf ' all (default) builds %%EXECUTABLES%%\n' |
| 146 | @printf ' clean removes all build files\n' |
Gavin Howard | df68c75 | 2019-01-07 17:48:44 -0700 | [diff] [blame] | 147 | @printf ' clean_config removes all build files as well as the generated Makefile\n' |
Gavin Howard | d15e01d | 2018-12-19 12:49:02 -0700 | [diff] [blame] | 148 | @printf ' clean_tests removes all build files as well as generated tests\n' |
| 149 | @printf ' install installs to %s%s/bin\n' "$(DESTDIR)" "$(PREFIX)" |
| 150 | @printf ' karatsuba runs the karatsuba script (requires Python 3)\n' |
| 151 | @printf ' karatsuba_test runs the karatsuba script while running tests\n' |
| 152 | @printf ' (requires Python 3)\n' |
| 153 | @printf ' uninstall uninstalls from %s%s/bin\n' "$(DESTDIR)" "$(PREFIX)" |
| 154 | @printf ' test runs the test suite\n' |
| 155 | @printf ' test_all runs the test suite as well as the Linux timeconst.bc test,\n' |
| 156 | @printf ' if it exists and bc has been built\n' |
| 157 | @printf ' test_bc runs the bc test suite, if bc has been built\n' |
| 158 | @printf ' test_dc runs the dc test suite, if dc has been built\n' |
| 159 | @printf ' timeconst runs the test on the Linux timeconst.bc script,\n' |
| 160 | @printf ' if it exists and bc has been built\n' |
| 161 | @printf ' valgrind runs the test suite through valgrind\n' |
| 162 | @printf ' valgrind_all runs the test suite, and the Linux timeconst.bc test,\n' |
| 163 | @printf ' if it exists and bc has been built, through valgrind\n' |
| 164 | @printf ' valgrind_bc runs the bc test suite, if bc has been built,\n' |
| 165 | @printf ' through valgrind\n' |
| 166 | @printf ' valgrind_dc runs the dc test suite, if dc has been built,\n' |
| 167 | @printf ' through valgrind\n' |
Gavin Howard | 27fa9cd | 2018-12-12 02:52:52 -0700 | [diff] [blame] | 168 | |
Gavin Howard | c27fccb | 2018-12-13 13:33:35 -0700 | [diff] [blame] | 169 | test_all: test timeconst |
Gavin Howard | 27fa9cd | 2018-12-12 02:52:52 -0700 | [diff] [blame] | 170 | |
Gavin Howard | 3109a59 | 2018-12-13 11:34:23 -0700 | [diff] [blame] | 171 | test: test_bc test_dc |
| 172 | |
| 173 | test_bc: |
Gavin Howard | 27fa9cd | 2018-12-12 02:52:52 -0700 | [diff] [blame] | 174 | %%BC_TEST%% |
Gavin Howard | 3109a59 | 2018-12-13 11:34:23 -0700 | [diff] [blame] | 175 | |
| 176 | test_dc: |
Gavin Howard | 27fa9cd | 2018-12-12 02:52:52 -0700 | [diff] [blame] | 177 | %%DC_TEST%% |
| 178 | |
Gavin Howard | c27fccb | 2018-12-13 13:33:35 -0700 | [diff] [blame] | 179 | timeconst: |
| 180 | %%TIMECONST%% |
Gavin Howard | 27fa9cd | 2018-12-12 02:52:52 -0700 | [diff] [blame] | 181 | |
Gavin Howard | c27fccb | 2018-12-13 13:33:35 -0700 | [diff] [blame] | 182 | valgrind: valgrind_bc valgrind_dc |
| 183 | |
| 184 | valgrind_bc: |
Gavin Howard | 27fa9cd | 2018-12-12 02:52:52 -0700 | [diff] [blame] | 185 | %%VG_BC_TEST%% |
Gavin Howard | c27fccb | 2018-12-13 13:33:35 -0700 | [diff] [blame] | 186 | |
| 187 | valgrind_dc: |
Gavin Howard | 27fa9cd | 2018-12-12 02:52:52 -0700 | [diff] [blame] | 188 | %%VG_DC_TEST%% |
| 189 | |
Gavin Howard | c27fccb | 2018-12-13 13:33:35 -0700 | [diff] [blame] | 190 | karatsuba: |
| 191 | %%KARATSUBA%% |
Gavin Howard | 27fa9cd | 2018-12-12 02:52:52 -0700 | [diff] [blame] | 192 | |
Gavin Howard | c27fccb | 2018-12-13 13:33:35 -0700 | [diff] [blame] | 193 | karatsuba_test: |
| 194 | %%KARATSUBA_TEST%% |
Gavin Howard | 27fa9cd | 2018-12-12 02:52:52 -0700 | [diff] [blame] | 195 | |
Gavin Howard | c27fccb | 2018-12-13 13:33:35 -0700 | [diff] [blame] | 196 | coverage:%%COVERAGE_PREREQS%% |
| 197 | %%COVERAGE%% |
Gavin Howard | 27fa9cd | 2018-12-12 02:52:52 -0700 | [diff] [blame] | 198 | |
| 199 | version: |
Gavin Howard | 40c1c4a | 2018-12-27 17:50:02 -0700 | [diff] [blame] | 200 | @printf '%s' "$(VERSION)" |
Gavin Howard | 27fa9cd | 2018-12-12 02:52:52 -0700 | [diff] [blame] | 201 | |
| 202 | libcname: |
Gavin Howard | 40c1c4a | 2018-12-27 17:50:02 -0700 | [diff] [blame] | 203 | @printf '%s' "$(BC_LIB_C)" |
Gavin Howard | 27fa9cd | 2018-12-12 02:52:52 -0700 | [diff] [blame] | 204 | |
Gavin Howard | 7220b8a | 2018-12-27 17:49:27 -0700 | [diff] [blame] | 205 | extra_math: |
Gavin Howard | 7724411 | 2018-12-27 17:50:40 -0700 | [diff] [blame] | 206 | @printf '%s' "$(BC_ENABLE_EXTRA_MATH)" |
Gavin Howard | 7220b8a | 2018-12-27 17:49:27 -0700 | [diff] [blame] | 207 | |
Gavin Howard | 27fa9cd | 2018-12-12 02:52:52 -0700 | [diff] [blame] | 208 | clean: |
Gavin Howard | ff1cc30 | 2018-12-27 13:22:36 -0700 | [diff] [blame] | 209 | @printf 'Cleaning files...\n' |
Gavin Howard | 103d5bb | 2018-12-27 13:21:48 -0700 | [diff] [blame] | 210 | @$(RM) -f $(OBJ) |
| 211 | @$(RM) -f $(BC_OBJ) |
| 212 | @$(RM) -f $(DC_OBJ) |
| 213 | @$(RM) -f $(HISTORY_OBJ) |
| 214 | @$(RM) -f $(BC_EXEC) |
| 215 | @$(RM) -f $(DC_EXEC) |
| 216 | @$(RM) -fr $(BIN) |
| 217 | @$(RM) -f $(GCDA) $(GCNO) |
| 218 | @$(RM) -f $(BC_GCDA) $(BC_GCNO) |
| 219 | @$(RM) -f $(DC_GCDA) $(DC_GCNO) |
| 220 | @$(RM) -f $(HISTORY_GCDA) $(HISTORY_GCNO) |
| 221 | @$(RM) -f *.gcov |
| 222 | @$(RM) -f *.html |
| 223 | @$(RM) -f *.gcda *.gcno |
| 224 | @$(RM) -f *.profraw |
| 225 | @$(RM) -f $(GEN_EXEC) |
Gavin Howard | aba12e7 | 2019-01-07 17:48:27 -0700 | [diff] [blame] | 226 | @$(RM) -f $(BC_LIB_C) $(BC_LIB_O) |
| 227 | @$(RM) -f $(BC_LIB_GCDA) $(BC_LIB_GCNO) |
| 228 | @$(RM) -f $(BC_LIB2_C) $(BC_LIB2_O) |
| 229 | @$(RM) -f $(BC_LIB2_GCDA) $(BC_LIB2_GCNO) |
| 230 | @$(RM) -f $(BC_HELP_C) $(BC_HELP_O) |
| 231 | @$(RM) -f $(BC_HELP_GCDA) $(BC_HELP_GCNO) |
| 232 | @$(RM) -f $(DC_HELP_C) $(DC_HELP_O) |
| 233 | @$(RM) -f $(DC_HELP_GCDA) $(DC_HELP_GCNO) |
Gavin Howard | 27fa9cd | 2018-12-12 02:52:52 -0700 | [diff] [blame] | 234 | |
Gavin Howard | 68f4a4e | 2019-01-07 17:50:15 -0700 | [diff] [blame] | 235 | clean_config: clean |
| 236 | @printf 'Cleaning config...\n' |
| 237 | @$(RM) -f Makefile |
| 238 | |
| 239 | clean_tests: clean clean_config |
Gavin Howard | ff1cc30 | 2018-12-27 13:22:36 -0700 | [diff] [blame] | 240 | @printf 'Cleaning test files...\n' |
Gavin Howard | 103d5bb | 2018-12-27 13:21:48 -0700 | [diff] [blame] | 241 | @$(RM) -f tests/bc/parse.txt tests/bc/parse_results.txt |
| 242 | @$(RM) -f tests/bc/print.txt tests/bc/print_results.txt |
| 243 | @$(RM) -f tests/bc/bessel.txt tests/bc/bessel_results.txt |
| 244 | @$(RM) -f .log_test.txt .log_bc.txt |
| 245 | @$(RM) -f .math.txt .results.txt .ops.txt |
| 246 | @$(RM) -f .test.txt |
Gavin Howard | 27fa9cd | 2018-12-12 02:52:52 -0700 | [diff] [blame] | 247 | |
Gavin Howard | 27fa9cd | 2018-12-12 02:52:52 -0700 | [diff] [blame] | 248 | install: |
| 249 | $(INSTALL) $(DESTDIR)$(PREFIX)/$(BIN) $(BIN) |
| 250 | |
| 251 | uninstall: |
| 252 | $(RM) -f $(DESTDIR)$(PREFIX)/$(BC_EXEC) |
| 253 | $(RM) -f $(DESTDIR)$(PREFIX)/$(DC_EXEC) |
| 254 | |
| 255 | .PHONY: help clean clean_tests install uninstall test |