6 # This file is part of a free library building Windows NT drivers.
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.
13 top_srcdir = @top_srcdir@
14 top_builddir = @top_builddir@
18 include ${top_builddir}/Makefile.comm
22 HEADERS = $(notdir $(wildcard ${top_srcdir}/include/ddk/*.h))
26 DEF_FILES = $(notdir $(wildcard ${srcdir}/*.def))
27 IMPLIBS = $(addprefix lib,$(subst .def,.a,$(DEF_FILES)))
30 DISTFILES = Makefile.in $(DEF_FILES)
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
41 $(ALL_CFLAGS) -Wall -pedantic -Wsystem-headers \
42 -c ${srcdir}/test.c -o test.o
46 @echo "Testing ddk..."
47 @for lang in c c++ objective-c; do \
49 $(CC) -x$$lang $(TEST_OPTIONS); \
50 echo "$$lang UNICODE..."; \
51 $(CC) -x$$lang -DUNICODE $(TEST_OPTIONS); \
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
61 # Install headers and libraries in a target specified directory.
63 install: install-libraries install-headers
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}; \
71 ddk_includedir = ${inst_includedir}/ddk
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}; \
79 # Uninstall headers and libraries from a target specified directory
81 uninstall: uninstall-libraries uninstall-headers
83 uninstall-libraries: $(need-DESTDIR-compatibility)
84 for file in $(LIBS); do \
85 rm -f $(DESTDIR)${inst_libdir}/$$file; \
87 rmdir $(DESTDIR)${inst_libdir}
89 uninstall-headers: $(need-DESTDIR-compatibility)
90 for file in $(HEADERS); do \
91 rm -r $(DESTDIR)${ddk_includedir}/$$file; \
93 rmdir $(DESTDIR)${ddk_includedir}
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; \
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; \
107 # Makefile.in: end of file