197 lines
5.7 KiB
Makefile
197 lines
5.7 KiB
Makefile
# @configure_input@
|
|
#
|
|
#
|
|
# Makefile.in
|
|
#
|
|
# This file is part of a free library for the Win32 API.
|
|
#
|
|
# This library is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
SUBDIRS = ddk directx
|
|
|
|
srcdir = @srcdir@
|
|
top_srcdir = @top_srcdir@
|
|
top_builddir = @top_builddir@
|
|
|
|
VPATH = @srcdir@
|
|
|
|
include ${top_builddir}/Makefile.comm
|
|
|
|
# Headers
|
|
#
|
|
HEADERS = $(notdir $(wildcard ${top_srcdir}/include/*.h))
|
|
GL_HEADERS = $(notdir $(wildcard ${top_srcdir}/include/GL/*.h))
|
|
GDIPLUS_HEADERS = $(notdir $(wildcard ${top_srcdir}/include/gdiplus/*.h))
|
|
|
|
# Libraries
|
|
#
|
|
DEF_FILES = $(notdir $(wildcard ${srcdir}/*.def))
|
|
MRI_FILES = $(notdir $(wildcard ${srcdir}/*.mri))
|
|
IMPLIBS = $(addprefix lib,$(subst .def,.a,$(DEF_FILES)))
|
|
MIMPLIBS = $(addprefix lib,$(subst .mri,.a,$(MRI_FILES)))
|
|
|
|
EXTRA_LIBS = libuuid.a libscrnsave.a libscrnsavw.a liblargeint.a
|
|
|
|
LIBS = $(IMPLIBS) $(MIMPLIBS) $(EXTRA_LIBS)
|
|
|
|
UUID_OBJS = \
|
|
mshtml-uuid.o msxml-uuid.o unknwn-uuid.o \
|
|
servprov-uuid.o oleidl-uuid.o oleacc-uuid.o ocidl-uuid.o \
|
|
objsafe-uuid.o oaidl-uuid.o docobj-uuid.o comcat-uuid.o \
|
|
exdisp-uuid.o mlang-uuid.o objidl-uuid.o cguid-uuid.o \
|
|
olectlid-uuid.o ativscp-uuid.o urlmon-uuid.o hlink-uuid.o \
|
|
hlguids-uuid.o extras-uuid.o devguid.o power-uuid.o shobjidl-uuid.o
|
|
|
|
EXTRA_OBJS = \
|
|
shell32.o scrnsave.o scrnsavw.o largeint.o gdiplus.o \
|
|
$(UUID_OBJS) ws2_32.o
|
|
|
|
UUID_SOURCES = \
|
|
mshtml-uuid.c msxml-uuid.c unknwn-uuid.c \
|
|
servprov-uuid.c oleidl-uuid.c oleacc-uuid.c ocidl-uuid.c \
|
|
objsafe-uuid.c oaidl-uuid.c docobj-uuid.c comcat-uuid.c \
|
|
exdisp-uuid.c mlang-uuid.c objidl-uuid.c cguid-uuid.c \
|
|
olectlid-uuid.c ativscp-uuid.c urlmon-uuid.c hlink-uuid.c \
|
|
hlguids-uuid.c extras-uuid.c devguid.c power-uuid.c shobjidl-uuid.c
|
|
|
|
SOURCES = \
|
|
scrnsave.c shell32.c largeint.c gdiplus.c $(UUID_SOURCES) \
|
|
res.rc test.c ws2_32.c
|
|
|
|
DISTFILES = Makefile.in $(DEF_FILES) $(MRI_FILES) $(SOURCES)
|
|
|
|
.NOTPARALLEL:
|
|
.PHONY: install install-libraries install-headers install-ddk
|
|
.PHONY: check test $(SUBDIRS)
|
|
|
|
# Targets: (note that 'all-default' is a redirection from 'all',
|
|
# which is the primary default target identified in the included
|
|
# common makefile fragment, ${top_builddir}/Makefile.comm
|
|
#
|
|
all-default: $(EXTRA_OBJS) $(LIBS) $(SUBDIRS)
|
|
|
|
%-subdirs:
|
|
for dir in $(SUBDIRS); do \
|
|
$(MAKE) -C $$dir $*; \
|
|
done
|
|
|
|
$(SUBDIRS):
|
|
cd $@ && $(MAKE)
|
|
|
|
TEST_OPTIONS = \
|
|
$(ALL_CFLAGS) -DWINVER=0x0666 -Wall -pedantic -Wsystem-headers \
|
|
-c ${srcdir}/test.c -o test.o
|
|
|
|
check test:
|
|
@echo "Testing w32api..."
|
|
@for lang in c c++ objective-c ; do \
|
|
echo "$$lang..."; \
|
|
$(CC) -x$$lang $(TEST_OPTIONS); \
|
|
echo "$$lang UNICODE..."; \
|
|
$(CC) -x$$lang -DUNICODE $(TEST_OPTIONS); \
|
|
done
|
|
@echo "windres..."
|
|
$(WINDRES) --include-dir $(INCDIR) -i ${srcdir}/res.rc -o test.o
|
|
@echo "windres UNICODE..."
|
|
$(WINDRES) --define UNICODE --include-dir $(INCDIR) -i ${srcdir}/res.rc -o test.o
|
|
rm -f test.o
|
|
|
|
scrnsavw.o: scrnsave.c
|
|
$(CC) -c $(ALL_CFLAGS) -DUNICODE -o $@ $<
|
|
|
|
# Rules
|
|
#
|
|
libuuid.a: $(UUID_OBJS)
|
|
$(AR) rc $@ $(UUID_OBJS)
|
|
$(RANLIB) $@
|
|
|
|
# libvfw32.a contains import stubs for 3 dll's. Using an MRI script
|
|
# seems to be the simplest way to combine them into one archive.
|
|
#
|
|
# NB: With older dlltool, the object file members will not have
|
|
# unique names.
|
|
#
|
|
libvfw32.a: vfw32.mri libmsvfw32.a libavifil32.a libavicap32.a
|
|
rm -f $@
|
|
$(AR) -M < ${word 1,$^}
|
|
$(RANLIB) $@
|
|
|
|
# Install headers and libraries in a target specified directory.
|
|
#
|
|
install: install-libraries install-headers install-ddk install-directx
|
|
|
|
install-libraries: all $(need-DESTDIR-compatibility)
|
|
$(mkinstalldirs) $(DESTDIR)${inst_libdir}
|
|
for file in $(LIBS); do \
|
|
$(INSTALL_DATA) $$file $(DESTDIR)${inst_libdir}; \
|
|
done
|
|
|
|
install-headers: $(need-DESTDIR-compatibility)
|
|
$(mkinstalldirs) $(DESTDIR)${inst_includedir}
|
|
for file in $(HEADERS); do \
|
|
$(INSTALL_DATA) ${top_srcdir}/include/$$file $(DESTDIR)${inst_includedir}; \
|
|
done
|
|
$(mkinstalldirs) $(DESTDIR)${inst_includedir}/GL
|
|
for file in $(GL_HEADERS); do \
|
|
$(INSTALL_DATA) ${top_srcdir}/include/GL/$$file $(DESTDIR)${inst_includedir}/GL; \
|
|
done
|
|
$(mkinstalldirs) $(DESTDIR)${inst_includedir}/gdiplus
|
|
for file in $(GDIPLUS_HEADERS); do \
|
|
$(INSTALL_DATA) ${top_srcdir}/include/gdiplus/$$file $(DESTDIR)${inst_includedir}/gdiplus; \
|
|
done
|
|
|
|
install-ddk: install-libraries install-headers
|
|
cd ddk && $(MAKE) install
|
|
|
|
install-directx: install-libraries install-headers
|
|
cd directx && $(MAKE) install
|
|
|
|
# Uninstall headers and libraries from a target specified directory
|
|
#
|
|
uninstall: uninstall-ddk uninstall-directx uninstall-libraries uninstall-headers
|
|
|
|
uninstall-libraries: $(need-DESTDIR-compatibility)
|
|
for file in $(LIBS); do \
|
|
rm -f $(DESTDIR)${inst_libdir}/$$file; \
|
|
done
|
|
rmdir $(DESTDIR)${inst_libdir}
|
|
|
|
uninstall-headers: $(need-DESTDIR-compatibility)
|
|
for file in $(HEADERS); do \
|
|
rm -f $(DESTDIR)${inst_includedir}/$$file; \
|
|
done
|
|
rmdir $(DESTDIR)${inst_includedir}
|
|
|
|
uninstall-ddk:
|
|
cd ddk && $(MAKE) uninstall
|
|
|
|
uninstall-directx:
|
|
cd directx && $(MAKE) uninstall
|
|
|
|
dist:
|
|
mkdir ${distdir}/include
|
|
chmod 755 ${distdir}/include
|
|
for file in $(HEADERS); do \
|
|
cp -p ${top_srcdir}/include/$$file ${distdir}/include; \
|
|
done
|
|
mkdir ${distdir}/include/GL
|
|
for file in $(GL_HEADERS); do \
|
|
cp -p ${top_srcdir}/include/GL/$$file ${distdir}/include/GL; \
|
|
done
|
|
mkdir ${distdir}/include/gdiplus
|
|
for file in $(GDIPLUS_HEADERS); do \
|
|
cp -p ${top_srcdir}/include/gdiplus/$$file ${distdir}/include/gdiplus; \
|
|
done
|
|
mkdir ${distdir}/lib
|
|
chmod 755 ${distdir}/lib
|
|
for file in $(DISTFILES); do \
|
|
cp -p ${srcdir}/$$file ${distdir}/lib; \
|
|
done
|
|
for dir in $(SUBDIRS); do \
|
|
(cd $$dir; $(MAKE) distdir=../${distdir} dist); \
|
|
done
|
|
|
|
# Makefile.in: end of file
|