|
| 1 | +#/ |
| 2 | +# @license Apache-2.0 |
| 3 | +# |
| 4 | +# Copyright (c) 2017 The Stdlib Authors. |
| 5 | +# |
| 6 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 7 | +# you may not use this file except in compliance with the License. |
| 8 | +# You may obtain a copy of the License at |
| 9 | +# |
| 10 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | +# |
| 12 | +# Unless required by applicable law or agreed to in writing, software |
| 13 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 14 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 | +# See the License for the specific language governing permissions and |
| 16 | +# limitations under the License. |
| 17 | +#/ |
1 | 18 |
|
2 | 19 | # VARIABLES # |
3 | 20 |
|
@@ -53,49 +70,66 @@ endif |
53 | 70 | cxx_targets := runner.out |
54 | 71 |
|
55 | 72 |
|
56 | | -# TARGETS # |
| 73 | +# RULES # |
57 | 74 |
|
58 | | -# Default target. |
| 75 | +#/ |
| 76 | +# Compiles C++ source files. |
59 | 77 | # |
60 | | -# This target is the default target. |
61 | | - |
| 78 | +# @param {string} BOOST - Boost source path |
| 79 | +# @param {string} [CXX_COMPILER] - C++ compiler |
| 80 | +# @param {string} [CXXFLAGS] - C++ compiler flags |
| 81 | +# @param {(string|void)} [fPIC] - flag indicating whether to generate position independent code |
| 82 | +# |
| 83 | +# @example |
| 84 | +# make |
| 85 | +# |
| 86 | +# @example |
| 87 | +# make all |
| 88 | +#/ |
62 | 89 | all: $(cxx_targets) |
63 | 90 |
|
64 | 91 | .PHONY: all |
65 | 92 |
|
66 | | - |
67 | | -# Compile C++ source. |
| 93 | +#/ |
| 94 | +# Compiles C++ source files. |
68 | 95 | # |
69 | | -# This target compiles C++ source files. |
70 | | - |
| 96 | +# @private |
| 97 | +# @param {string} CXX - C++ compiler |
| 98 | +# @param {string} CXXFLAGS - C++ compiler flags |
| 99 | +# @param {(string|void)} fPIC - flag indicating whether to generate position independent code |
| 100 | +# @param {string} BOOST - Boost source path |
| 101 | +#/ |
71 | 102 | $(cxx_targets): %.out: %.cpp $(BOOST) |
72 | 103 | $(QUIET) $(CXX) $(CXXFLAGS) $(fPIC) -I $(BOOST) -o $@ $< -lm |
73 | 104 |
|
74 | | - |
75 | | -# Generate test fixtures. |
| 105 | +#/ |
| 106 | +# Generates test fixtures. |
76 | 107 | # |
77 | | -# This target generates test fixtures. |
78 | | - |
| 108 | +# @example |
| 109 | +# make run |
| 110 | +#/ |
79 | 111 | run: $(cxx_targets) |
80 | 112 | $(QUIET) ./$< |
81 | 113 |
|
82 | 114 | .PHONY: run |
83 | 115 |
|
84 | | - |
85 | | -# Perform clean-up. |
| 116 | +#/ |
| 117 | +# Removes generated files. |
86 | 118 | # |
87 | | -# This target removes generated files. |
88 | | - |
| 119 | +# @example |
| 120 | +# make clean |
| 121 | +#/ |
89 | 122 | clean: |
90 | 123 | $(QUIET) -rm -f *.o *.out |
91 | 124 |
|
92 | 125 | .PHONY: clean |
93 | 126 |
|
94 | | - |
95 | | -# Remove fixtures. |
| 127 | +#/ |
| 128 | +# Removes generated test fixtures. |
96 | 129 | # |
97 | | -# This target removes fixture data. |
98 | | - |
| 130 | +# @example |
| 131 | +# make clean-fixtures |
| 132 | +#/ |
99 | 133 | clean-fixtures: |
100 | 134 | $(QUIET) -rm -f *.json |
101 | 135 |
|
|
0 commit comments