OSDN Git Service

Add 'check' as GCS conforming alias for make's 'test' goal.
[pf3gnuchains/pf3gnuchains4x.git] / winsup / w32api / lib / ddk / Makefile.in
1 # @configure_input@
2 #
3 #
4 # Makefile.in
5 #
6 # This file is part of a free library building Windows NT drivers.
7
8 # This library is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11
12 srcdir = @srcdir@
13 top_srcdir = @top_srcdir@
14 top_builddir = @top_builddir@
15
16 VPATH = @srcdir@
17
18 include ${top_builddir}/Makefile.comm
19
20 # Headers
21 #
22 HEADERS = $(notdir $(wildcard ${top_srcdir}/include/ddk/*.h))
23
24 # Libraries
25 #
26 DEF_FILES = $(notdir $(wildcard ${srcdir}/*.def))
27 IMPLIBS = $(addprefix lib,$(subst .def,.a,$(DEF_FILES)))
28 LIBS = $(IMPLIBS)
29
30 DISTFILES = Makefile.in $(DEF_FILES)
31
32 .NOTPARALLEL:
33
34 # Targets: (note that 'all-default' is a redirection from 'all',
35 # which is the primary default target identified in the included
36 # common makefile fragment, ${top_builddir}/Makefile.comm
37 #
38 all-default: $(LIBS)
39
40 TEST_OPTIONS = \
41   $(ALL_CFLAGS) -Wall -pedantic -Wsystem-headers \
42   -c ${srcdir}/test.c -o test.o
43
44 .PHONY: check test
45 check test:
46         @echo "Testing ddk..."
47         @for lang in c c++ objective-c; do \
48           echo "$$lang..."; \
49           $(CC) -x$$lang $(TEST_OPTIONS); \
50           echo "$$lang UNICODE..."; \
51           $(CC) -x$$lang -DUNICODE $(TEST_OPTIONS); \
52         done
53         @echo "windres..."
54         $(WINDRES) --include-dir ${INCDIR} -i ${srcdir}/res.rc -o test.o
55         @echo "windres UNICODE..."
56         $(WINDRES) --define UNICODE --include-dir ${INCDIR} -i ${srcdir}/res.rc -o test.o
57         rm -f test.o
58
59 # Rules
60 #
61 # Install headers and libraries in a target specified directory.
62 #
63 install: install-libraries install-headers
64
65 install-libraries: all $(need-DESTDIR-compatibility)
66         $(mkinstalldirs) $(DESTDIR)${inst_libdir}
67         for file in $(LIBS); do \
68           $(INSTALL_DATA) $$file $(DESTDIR)${inst_libdir}; \
69         done
70
71 ddk_includedir = ${inst_includedir}/ddk
72
73 install-headers: $(need-DESTDIR-compatibility)
74         $(mkinstalldirs) $(DESTDIR)${ddk_includedir}
75         for file in $(HEADERS); do \
76           $(INSTALL_DATA) ${top_srcdir}/include/ddk/$$file $(DESTDIR)${ddk_includedir}; \
77         done
78
79 # Uninstall headers and libraries from a target specified directory
80 #
81 uninstall: uninstall-libraries uninstall-headers
82
83 uninstall-libraries: $(need-DESTDIR-compatibility)
84         for file in $(LIBS); do \
85           rm -f $(DESTDIR)${inst_libdir}/$$file; \
86         done
87         rmdir $(DESTDIR)${inst_libdir}
88
89 uninstall-headers: $(need-DESTDIR-compatibility)
90         for file in $(HEADERS); do \
91           rm -r $(DESTDIR)${ddk_includedir}/$$file; \
92         done
93         rmdir $(DESTDIR)${ddk_includedir}
94
95 dist:
96         mkdir ${distdir}/include/ddk
97         chmod 755 ${distdir}/include/ddk
98         for file in $(HEADERS); do \
99           cp -p ${top_srcdir}/include/ddk/$$file ${distdir}/include/ddk; \
100         done
101         mkdir ${distdir}/lib/ddk
102         chmod 755 ${distdir}/lib/ddk
103         for file in $(DISTFILES); do \
104           cp -p ${srcdir}/$$file ${distdir}/lib/ddk; \
105         done
106
107 # Makefile.in: end of file