1 include ..
/src
/Makefile.inc
3 OBJS
:= $(wildcard ..
/src
/*.o
)
4 SRCS
:= $(wildcard *.c
)
5 TESTS
:= $(SRCS
:%.c
=%.
test)
8 $(CC
) $(CFLAGS
) $< -c
-o
$@
10 # First specific tests
12 $(CC
) $(LDFLAGS
) $< $(filter-out ..
/src
/isds.o
,$(OBJS
)) -o
$@
14 # Then generic rule. Order is important.
16 $(CC
) $(LDFLAGS
) $< $(OBJS
) -o
$@
22 for T in
$^
; do
"./$$T" || FAILED
=$$((FAILED
+1)); done
; \
23 if
[ "$$FAILED" -gt
"0" ]; then \
25 test "$$FAILED" == "1" && UNIT
="unit test"; \
26 echo
"*** $$FAILED $$UNIT failed. Please tell developers about it."; \
27 echo
"Your report can make this world better!"; \
28 echo
"*** Environment info:"; \
29 echo
"Platform: $$(uname -msr)"; \
30 echo
"CFLAGS: $(CFLAGS)"; \
31 echo
"LDFLAGS: $(LDFLAGS)"; \
32 echo
"Compiler: $$($(CC) --version)"; \
33 echo
"libxml: $$(pkg-config --modversion libxml-2.0)"; \
34 echo
"libcurl: $$(pkg-config --modversion libcurl)"; \
35 echo
"libcrypt: $$(libgcrypt-config --version)"; \
36 echo
"ksba: $$(ksba-config --version)"; \
37 echo
"gpgme: $$(gpgme-config --version)"; \
40 echo
"*** All tests passed. Today's your lucky day :)"; \