-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathMakefile
489 lines (355 loc) · 15.3 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
# Makefile for homog2d library
# see https://github.com/skramm/homog2d
.PHONY: doc test testall install demo check doc-fig nobuild showcase speed_test
.PHONY:BUILD/html/index.html
.PRECIOUS: BUILD/figures_test/%.cpp BUILD/%.png BUILD/no_build/%.cpp
#BUILD/showcase/%
.SECONDARY:
#Disabling the built-in rules is done by writing an empty rule for .SUFFIXES:
.SUFFIXES:
SHELL=bash
CXXFLAGS += -O2 -std=c++17 -Wall -Wextra -Wshadow -Wnon-virtual-dtor -pedantic
#=======================================================================
# makefile options
ifeq "$(USE_OPENCV)" ""
USE_OPENCV=N
endif
ifeq ($(USE_OPENCV),Y)
CXXFLAGS += -DHOMOG2D_USE_OPENCV
LDFLAGS += `pkg-config --libs opencv`
endif
ifeq "$(USE_TINYXML2)" ""
USE_TINYXML2=N
endif
ifeq ($(USE_TINYXML2),Y)
CXXFLAGS += -DHOMOG2D_USE_SVG_IMPORT
LDFLAGS += `pkg-config --libs tinyxml2`
endif
ifeq ($(USE_EIGEN),Y)
CXXFLAGS += -DHOMOG2D_USE_EIGEN
endif
ifeq ($(USE_BOOSTGEOM),Y)
CXXFLAGS += -DHOMOG2D_USE_BOOSTGEOM
endif
ifeq ($(USE_RTP),Y)
CXXFLAGS += -DHOMOG2D_ENABLE_PRTP
endif
ifeq ($(DEBUG),Y)
CXXFLAGS += -g
CXXFLAGS += -DHOMOG2D_DEBUGMODE
endif
#=======================================================================
# general/common targets
# a cppcheck target, lots of warnings, but few of them are really useful
check:
@cppcheck --version
cppcheck . -iBUILD -imisc/figures_test -imisc/figures_src --enable=all -DHOMOG2D_INUMTYPE=double --std=c++17 2>cppcheck.log
xdg-open cppcheck.log
.PHONY: doc doc-dev doc-all
doc: DOX_FILE=doxyfile
doc: BUILD/html/index.html
xdg-open BUILD/html/index.html
doc-dev: DOX_FILE=doxyfile_dev
doc-dev: BUILD/html/index.html
xdg-open BUILD/html/index.html
# also (re)builds the figures, but requires Opencv AND Latex!
doc-all: BUILD/html/index.html doc-fig doc-fig-tex
xdg-open BUILD/html/index.html
install:
cp homog2d.hpp /usr/local/include
demo: BUILD/demo_opencv
BUILD/demo_opencv
demo-import: BUILD/demo_svg_import
@echo "-done target $@"
clean:
@-rm -r BUILD/*
@-rm homog2d_test
@-rm demo_opencv
@-rm *.gcov
# just a debug target...
show:
@echo "CXX=$(CXX)"
@echo "DOC_IMAGES_LOC=$(DOC_IMAGES_LOC)"
@echo "DOC_IMAGES_SRC=$(DOC_IMAGES_SRC)"
@echo "DOC_IMAGES_OUT=$(DOC_IMAGES_OUT)"
@echo "TEX_FIG_LOC=$(TEX_FIG_LOC)"
@echo "TEX_FIG_SRC=$(TEX_FIG_SRC)"
@echo "TEX_FIG_PNG=$(TEX_FIG_PNG)"
@echo "SHOWCASE_SRC=$(SHOWCASE_SRC)"
@echo "SHOWCASE_BIN=$(SHOWCASE_BIN)"
@echo "SHOWCASE_PNG=$(SHOWCASE_PNG)"
@echo "SHOWCASE_GIF=$(SHOWCASE_GIF)"
@echo "TEST_FIG_SRC=$(TEST_FIG_SRC)"
@echo "TEST_FIG_SVG=$(TEST_FIG_SVG)"
@echo "NOBUILD_SRC_FILES=$(NOBUILD_SRC_FILES)"
@echo "NOBUILD_OBJ_FILES=$(NOBUILD_OBJ_FILES)"
#=======================================================================
# testing targets
variants=test_SYVN test_SNVN test_SYVY test_SNVY
#BUILD/homog2d_test_SY BUILD/homog2d_test_SN
.PHONY: newtests_before
newtests_before: CXXFLAGS += -Wno-unused-but-set-variable
newtests: newtests_before
@if [ -f BUILD/homog2d_test.stderr ]; then echo "start test">BUILD/homog2d_ntest.stderr; fi
@echo "COUCOU"
$(foreach variant,$(variants),echo "--start $(variant)"; $(MAKE) $(variant) 2>>BUILD/homog2d_ntest_$(variant).stderr;)
.PHONY: test test2 nobuild buildf
test: test2 nobuild test-rtp
@echo "-done target $@"
test2: test_SYVN test_SNVN test_SYVY test_SNVY test3
@echo "Make: run test2, build using $(CXX)"
BUILD/homog2d_test_SYVN
BUILD/homog2d_test_SNVN
BUILD/homog2d_test_SYVY
BUILD/homog2d_test_SNVY
BUILD/test_single
BUILD/test_multiple
@echo "-done target $@"
test-list: test_SNVN
@echo "Tests available:"
-BUILD/homog2d_test_SNVN --list-tests
test_SYVY: CXXFLAGS += -DHOMOG2D_OPTIMIZE_SPEED
test_SYVN: CXXFLAGS += -DHOMOG2D_OPTIMIZE_SPEED
test_SYVY: CXXFLAGS += -DHOMOG2D_ENABLE_VRTP
test_SNVY: CXXFLAGS += -DHOMOG2D_ENABLE_VRTP
test_SYVN: BUILD/homog2d_test_SYVN
@echo "-done target $@"
test_SNVN: BUILD/homog2d_test_SNVN
@echo "-done target $@"
test_SYVY: BUILD/homog2d_test_SYVY
@echo "-done target $@"
test_SNVY: BUILD/homog2d_test_SNVY
@echo "-done target $@"
test3: test_single test_multiple
@echo "-done target $@"
test_single: BUILD/test_single
@echo "-done target $@"
test_multiple: BUILD/test_multiple
@echo "-done target $@"
buildf:
@mkdir -p BUILD
BUILD/homog2d_test_SYVN BUILD/homog2d_test_SNVN BUILD/homog2d_test_SYVY BUILD/homog2d_test_SNVY: misc/homog2d_test.cpp homog2d.hpp Makefile buildf
@if [ -f BUILD/$(notdir $@).stderr ]; then rm BUILD/$(notdir $@).stderr; fi
$(CXX) $(CXXFLAGS) -Wno-unused-but-set-variable -O2 -o $@ $< $(LDFLAGS) 2>BUILD/$(notdir $@).stderr
BUILD/test_single: misc/test_files/single_file.cpp homog2d.hpp Makefile buildf
$(CXX) $(CXXFLAGS) -O2 -o $@ $< $(LDFLAGS)
BUILD/%.o: misc/test_files/%.cpp homog2d.hpp Makefile buildf
$(CXX) $(CXXFLAGS) -c $< -o $@
BUILD/test_multiple: BUILD/test_multiple.o BUILD/mylib.o buildf
$(CXX) $(CXXFLAGS) -o BUILD/test_multiple BUILD/test_multiple.o BUILD/mylib.o $(LDFLAGS)
# temporarly removed from target testall: speed_test_b
testall: test BUILD/homog2d_test_f BUILD/homog2d_test_d BUILD/homog2d_test_l speed_test_b
@echo "Make: run testall, build using $(CXX)"
misc/test_all.sh
@echo "-done target $@"
BUILD/homog2d_test_f: misc/homog2d_test.cpp homog2d.hpp buildf
$(CXX) $(CXXFLAGS) -DNUMTYPE=float -O2 -o $@ $< $(LDFLAGS) 2>BUILD/homog2d_test_f.stderr
BUILD/homog2d_test_d: misc/homog2d_test.cpp homog2d.hpp buildf
$(CXX) $(CXXFLAGS) -DNUMTYPE=double -O2 -o $@ $< $(LDFLAGS) 2>BUILD/homog2d_test_d.stderr
BUILD/homog2d_test_l: misc/homog2d_test.cpp homog2d.hpp buildf
$(CXX) $(CXXFLAGS) "-DHOMOG2D_INUMTYPE=long double" "-DNUMTYPE=long double" -O2 -o $@ $< $(LDFLAGS) 2>BUILD/homog2d_test_l.stderr
.PHONY: test-bg test-bn
# "bigmath test, with ttmath
test-bn: BUILD/ttmath_t1
BUILD/ttmath_t1
@echo "-done target $@"
BUILD/ttmath_t1: misc/test_files/ttmath_t1.cpp homog2d.hpp Makefile buildf
@$(CXX) $(CXXFLAGS) -O2 -o $@ $< $(LDFLAGS)
# test of importing a Boost::geometry polygon
test-bg: BUILD/bg_test_1 buildf
BUILD/bg_test_1
@echo "-done target $@"
BUILD/bg_test_1: misc/test_files/bg_test_1.cpp homog2d.hpp Makefile buildf
@$(CXX) $(CXXFLAGS) -O2 -o $@ $< $(LDFLAGS)
test-rtp: BUILD/homog2d_test_rtp_1 BUILD/homog2d_test_rtp_2 BUILD/homog2d_test_rtp_3
@echo "-Running RTP test 1:"
@BUILD/homog2d_test_rtp_1
@echo "-Running RTP test 2:"
@BUILD/homog2d_test_rtp_2
@echo "-Running RTP test 3:"
@BUILD/homog2d_test_rtp_3
BUILD/homog2d_test_rtp_%: misc/test_files/homog2d_test_rtp_%.cpp homog2d.hpp buildf
$(CXX) $(CXXFLAGS) -O2 -o $@ $< $(LDFLAGS) 2>$@.stderr
#=======================================================================
# speed test
speed_test: speed_test_b
@time BUILD/ellipse_speed_test_SYCN
@time BUILD/ellipse_speed_test_SY
@time BUILD/ellipse_speed_test_SN
speed_test_b: BUILD/ellipse_speed_test_SYCN BUILD/ellipse_speed_test_SY BUILD/ellipse_speed_test_SN
BUILD/ellipse_speed_test_SY: CXXFLAGS += -DHOMOG2D_OPTIMIZE_SPEED
# No Checking
BUILD/ellipse_speed_test_SYCN: CXXFLAGS += -DHOMOG2D_OPTIMIZE_SPEED -DHOMOG2D_NOCHECKS
BUILD/ellipse_speed_test_SY: misc/ellipse_speed_test.cpp homog2d.hpp Makefile buildf
$(CXX) $(CXXFLAGS) -O2 -o $@ $< $(LDFLAGS) 2>BUILD/ellipse_speed_test_SY.stderr
BUILD/ellipse_speed_test_SYCN: misc/ellipse_speed_test.cpp homog2d.hpp Makefile buildf
$(CXX) $(CXXFLAGS) -O2 -o $@ $< $(LDFLAGS) 2>BUILD/ellipse_speed_test_SY.stderr
BUILD/ellipse_speed_test_SN: misc/ellipse_speed_test.cpp homog2d.hpp Makefile buildf
$(CXX) $(CXXFLAGS) -O2 -o $@ $< $(LDFLAGS) 2>BUILD/ellipse_speed_test_NY.stderr
#=======================================================================
# Generation of the doc figures from code
DOC_IMAGES_LOC:=misc/figures_src/src
DOC_IMAGES_SRC:=$(wildcard $(DOC_IMAGES_LOC)/*.cpp)
DOC_IMAGES_EXE:=$(patsubst $(DOC_IMAGES_LOC)/%.cpp,BUILD/img/%.png, $(DOC_IMAGES_SRC))
DOC_IMAGES_OUT:=$(patsubst $(DOC_IMAGES_LOC)/%.cpp,BUILD/img/bin/%, $(DOC_IMAGES_SRC))
.PRECIOUS: BUILD/img/%
# run the program => builds the png (or svg) image
BUILD/img/%.png: BUILD/img/bin/%
@echo "Running $< to generate $@"
@cd BUILD/img; bin/$(notdir $<)
# build the program
BUILD/img/bin/%: $(DOC_IMAGES_LOC)/%.cpp homog2d.hpp
@mkdir -p BUILD/img/bin
@echo "Building $@"
@$(CXX) $(CXXFLAGS) `pkg-config --cflags opencv` -I. -o $@ $< `pkg-config --libs opencv`
@echo "Running $< to generate images"
@cd BUILD/img; bin/$(notdir $<)
doc-fig: $(DOC_IMAGES_EXE) build_gif_pip
@echo "done target $@"
build_gif_pip:
convert -delay 80 BUILD/img/demo_pip_* BUILD/img/demo_pip.gif
#=======================================================================
# Generation of the doc figures from LaTeX sources
TEX_FIG_LOC=misc/figures_src/latex
TEX_FIG_SRC=$(wildcard $(TEX_FIG_LOC)/*.tex)
TEX_FIG_PNG=$(patsubst $(TEX_FIG_LOC)/%.tex,BUILD/fig_latex/%.png, $(TEX_FIG_SRC))
BUILD/fig_latex/%.tex: $(TEX_FIG_LOC)/%.tex
@mkdir -p BUILD/fig_latex/
@cp $< $@
BUILD/fig_latex/%.png: BUILD/fig_latex/%.tex
cd BUILD/fig_latex; pdflatex --shell-escape $(notdir $<) 1>latex.stdout 2>latex.stderr
doc-fig-tex: $(TEX_FIG_PNG)
#=======================================================================
# Generation of SVG figures for the test samples
TEST_FIG_LOC=misc/figures_test
TEST_FIG_SRC=$(wildcard $(TEST_FIG_LOC)/*.code)
TEST_FIG_SVG=$(patsubst $(TEST_FIG_LOC)/%.code,BUILD/figures_test/%.svg, $(TEST_FIG_SRC))
test-fig: $(TEST_FIG_SVG)
# run the program to produce image, and flip it vertically (so vertical axis is going up)
BUILD/figures_test/%.svg: BUILD/figures_test/%
@echo "Running $<"
@./$<
# @mogrify -flip $<.png
# build the program from source
BUILD/figures_test/%: BUILD/figures_test/%.cpp
@echo "Building $<"
@$(CXX) -o $@ $<
# @$(CXX) `pkg-config --cflags opencv` -o $@ $< `pkg-config --libs opencv`
# build source file
BUILD/figures_test/frect_%.cpp: $(TEST_FIG_LOC)/frect_%.code homog2d.hpp $(TEST_FIG_LOC)/t_header.cxx $(TEST_FIG_LOC)/t_footer_frect_1.cxx
@echo "generating $@"
@mkdir -p BUILD/figures_test/
@cat $(TEST_FIG_LOC)/t_header.cxx $< $(TEST_FIG_LOC)/t_footer_frect_1.cxx >BUILD/figures_test/$(notdir $(basename $<)).cpp
# build source file
BUILD/figures_test/polyline_%.cpp: $(TEST_FIG_LOC)/polyline_%.code homog2d.hpp $(TEST_FIG_LOC)/t_header.cxx $(TEST_FIG_LOC)/t_footer_polyline_1.cxx
@echo "generating $@"
@mkdir -p BUILD/figures_test/
@cat $(TEST_FIG_LOC)/t_header.cxx $< $(TEST_FIG_LOC)/t_footer_polyline_1.cxx >BUILD/figures_test/$(notdir $(basename $<)).cpp
#=======================================================================
DOC_MD_PAGES=$(wildcard docs/*.md)
BUILD/html/index.html: misc/homog2d_test.cpp homog2d.hpp misc/doxyfile README.md $(DOC_MD_PAGES)
@mkdir -p BUILD/html
doxygen misc/$(DOX_FILE) 1>BUILD/doxygen.stdout 2>BUILD/doxygen.stderr
# this target requires Opencv
BUILD/demo_opencv: misc/demo_opencv.cpp homog2d.hpp buildf
$(CXX) $(CXXFLAGS) `pkg-config --cflags opencv` -I. -o $@ $< `pkg-config --libs opencv` $$(pkg-config --libs tinyxml2)
# this target requires Tinyxml2
BUILD/demo_svg_import: misc/test_files/demo_svg_import.cpp homog2d.hpp buildf
$(CXX) $(CXXFLAGS) -I. -o $@ $< $$(pkg-config --libs tinyxml2)
diff:
git diff | colordiff | aha > diff.html
xdg-open diff.html
#=================================================================
# The following is used to make sure that some code constructions will not build
NOBUILD_SRC_FILES := $(notdir $(wildcard misc/no_build/*.cxx))
NOBUILD_OBJ_FILES := $(patsubst %.cxx,BUILD/no_build/src/%, $(NOBUILD_SRC_FILES))
nobuild: $(NOBUILD_OBJ_FILES)
@echo "-done target $@"
# assemble file to create a cpp program holding a main()
BUILD/no_build/src/no_build_%.cpp: misc/no_build/no_build_%.cxx
@mkdir -p BUILD/no_build/src
@mkdir -p BUILD/no_build/log
@cat misc/no_build/header.txt >BUILD/no_build/src/$(notdir $@)
@cat $< >>BUILD/no_build/src/$(notdir $@)
@cat misc/no_build/footer.txt >>BUILD/no_build/src/$(notdir $@)
# compile, and return 0 if compilation fails (which is supposed to happen)
BUILD/no_build/src/no_build_%: BUILD/no_build/src/no_build_%.cpp
@echo "Checking build failure of $<"
@! $(CXX) $(CXXFLAGS) -o $@ $< $(LDFLAGS) 1>BUILD/no_build/log/$(notdir $(basename $<)).stdout 2>BUILD/no_build/log/$(notdir $(basename $<)).stderr
#=================================================================
# SHOWCASE: generates gif images of some situations
SHOWCASE_SRC_LOC=misc/showcase
SHOWCASE_SRC=$(wildcard $(SHOWCASE_SRC_LOC)/showcase*.cpp)
#SHOWCASE_BIN=$(patsubst $(SHOWCASE_SRC_LOC)/showcase%.cpp,BUILD/showcase/showcase%, $(SHOWCASE_SRC))
SHOWCASE_GIF=$(patsubst $(SHOWCASE_SRC_LOC)/showcase%.cpp,BUILD/showcase/gif/showcase%.gif, $(SHOWCASE_SRC))
# compile program that will generate the set of png files
BUILD/showcase/showcase%: $(SHOWCASE_SRC_LOC)/showcase%.cpp homog2d.hpp Makefile
@mkdir -p BUILD/showcase/
@mkdir -p BUILD/showcase/gif
@echo " -Building program $@"
@$(CXX) $(CXXFLAGS) `pkg-config --cflags opencv` -o $@ $< `pkg-config --libs opencv`
# build png files by running program
BUILD/showcase/%_00.png: BUILD/showcase/%
@echo " -Running program $< to generate images"
@cd BUILD/showcase/; ./$(notdir $<)
BUILD/showcase/gif/showcase%.gif: BUILD/showcase/showcase%.gif
@mv $< $@
# build final gif by running script
BUILD/showcase/showcase%.gif: BUILD/showcase/showcase%_00.png
@echo " -Generating gif $@ from images"
@b=$(notdir $(basename $@)); \
a=$$(grep $$b misc/showcase/gif_duration.data); arr=($$a); \
duration=$${arr[1]}; \
if [[ $$duration != 0 ]]; then \
misc/build_gif.sh $@ $$duration; \
fi
showcase: $(SHOWCASE_GIF)
@echo "-done target $@"
#------------------------------------------------------------------------------
SHOWCASE2_SRC_LOC=misc/showcase_v
SHOWCASE2_SRC=$(wildcard $(SHOWCASE2_SRC_LOC)/showcase*.cpp)
SHOWCASE2=$(patsubst $(SHOWCASE2_SRC_LOC)/%.cpp,BUILD/showcase2/%, $(SHOWCASE2_SRC))
# compile program that will generate the set of png files
BUILD/showcase2/showcase%: $(SHOWCASE2_SRC_LOC)/showcase%.cpp homog2d.hpp Makefile
@mkdir -p BUILD/showcase2/
@echo " -Building program $@"
@$(CXX) `pkg-config --cflags opencv` -o $@ $< `pkg-config --libs opencv`
showcase2: $(SHOWCASE2)
@echo "-done target $@"
#------------------------------------------------------------------------------
SHOWCASE3_SRC_LOC=misc/showcase3
SHOWCASE3_SRC=$(wildcard $(SHOWCASE3_SRC_LOC)/problem*.cpp)
SHOWCASE3=$(patsubst $(SHOWCASE3_SRC_LOC)/%.cpp,BUILD/showcase3/%, $(SHOWCASE3_SRC))
BUILD/showcase3/problem%: $(SHOWCASE3_SRC_LOC)/problem%.cpp homog2d.hpp Makefile
@mkdir -p BUILD/showcase3/
@echo " -Building program $@"
$(CXX) $(CXXFLAGS) -o $@ $<
./$@
showcase3: $(SHOWCASE3)
@echo "-done target $@"
#------------------------------------------------------------------------------
FNAME1:=dtest1
.PHONY: $(FNAME1)
dtest1: BUILD/$(FNAME1)_f.png
DTEST1_BIN:=BUILD/$(FNAME1)_f BUILD/$(FNAME1)_d BUILD/$(FNAME1)_l
DTEST1_DATA=$(patsubst %,%.data,$(DTEST1_BIN) )
BUILD/$(FNAME1)_f.png: $(DTEST1_DATA) misc/dtest1.plt buildf
misc/dtest1.plt
BUILD/$(FNAME1)_%.data: BUILD/$(FNAME1)_%
@echo "# fields description: see misc/dtest1.spp" > $@
./$< .0001 >> $@
./$< .001 >> $@
./$< .01 >> $@
./$< .1 >> $@
./$< 1 >> $@
./$< 10 >> $@
./$< 100 >> $@
./$< 1000 >> $@
./$< 10000 >> $@
./$< 100000 >> $@
BUILD/$(FNAME1)_f: CXXFLAGS+=-DHOMOG2D_INUMTYPE=float
BUILD/$(FNAME1)_d: CXXFLAGS+=-DHOMOG2D_INUMTYPE=double
BUILD/$(FNAME1)_l: CXXFLAGS+="-DHOMOG2D_INUMTYPE=long double"
$(DTEST1_BIN): misc/$(FNAME1).cpp Makefile homog2d.hpp
$(CXX) $(CXXFLAGS) -o $@ $<
#=================================================================