Mercurial > libbase64
annotate Makefile @ 29:daeb2f6e6b22
base64: use more idiomatic comparison
author | David Demelier <markand@malikania.fr> |
---|---|
date | Mon, 17 May 2021 13:43:17 +0200 |
parents | 3172e43c9b43 |
children | 16f64f665b1d |
rev | line source |
---|---|
22 | 1 # |
2 # Makefile -- basic Makefile for libbase64 | |
3 # | |
4 # Copyright (c) 2013-2020 David Demelier <markand@malikania.fr> | |
5 # | |
6 # Permission to use, copy, modify, and/or distribute this software for any | |
7 # purpose with or without fee is hereby granted, provided that the above | |
8 # copyright notice and this permission notice appear in all copies. | |
9 # | |
10 # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | |
11 # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | |
12 # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | |
13 # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | |
14 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | |
15 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | |
16 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | |
17 # | |
18 | |
19 .POSIX: | |
20 | |
25
3172e43c9b43
base64: use -1 to read until end of string
David Demelier <markand@malikania.fr>
parents:
22
diff
changeset
|
21 CC= cc |
3172e43c9b43
base64: use -1 to read until end of string
David Demelier <markand@malikania.fr>
parents:
22
diff
changeset
|
22 CXX= c++ |
3172e43c9b43
base64: use -1 to read until end of string
David Demelier <markand@malikania.fr>
parents:
22
diff
changeset
|
23 CFLAGS= -O3 -DNDEBUG |
3172e43c9b43
base64: use -1 to read until end of string
David Demelier <markand@malikania.fr>
parents:
22
diff
changeset
|
24 CXXFLAGS= -std=c++17 -O3 -DNDEBUG |
22 | 25 |
26 .SUFFIXES: | |
27 .SUFFIXES: .c .cpp .o | |
28 | |
29 all: | |
30 | |
31 .c.o: | |
32 ${CC} ${CFLAGS} -Iextern/libgreatest -I. -c $< -o $@ ${LDFLAGS} | |
33 | |
34 .cpp.o: | |
25
3172e43c9b43
base64: use -1 to read until end of string
David Demelier <markand@malikania.fr>
parents:
22
diff
changeset
|
35 ${CXX} ${CXXFLAGS} -Iextern/libgreatest -I. -c $< -o $@ ${LDFLAGS} |
22 | 36 |
37 test/base64.o: base64.h | |
38 | |
39 test/base64: test/base64.o base64.o | |
40 ${CC} -o $@ test/base64.o base64.o ${LDFLAGS} | |
41 | |
42 test/base64++.o: base64.hpp | |
43 | |
44 test/base64++: test/base64++.o | |
25
3172e43c9b43
base64: use -1 to read until end of string
David Demelier <markand@malikania.fr>
parents:
22
diff
changeset
|
45 ${CXX} -o $@ test/base64++.o ${LDFLAGS} |
22 | 46 |
47 tests: test/base64 test/base64++ | |
48 test/base64 | |
49 test/base64++ | |
50 | |
51 doxygen: | |
52 doxygen Doxyfile | |
53 | |
54 clean: | |
55 rm -f *.o test/*.o | |
56 rm -f test/base64 test/base64++ | |
57 | |
58 .PHONY: all clean doxygen tests |