Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Marshall <keithmarshall@@users.sf.net>2011-12-14 00:46:53 +0400
committerKeith Marshall <keithmarshall@@users.sf.net>2011-12-14 00:46:53 +0400
commitf46fcfebd137a85cefaea1b67edd406af328dc8b (patch)
tree53347dc2e64bb9910a2a2414b6ee5437a6832778 /winsup/w32api/lib
parent5cc68751fd69f4b1e29b68b2c98bf8985302d314 (diff)
Factor common code from subdirectory makefiles into Makefile.comm.in
Diffstat (limited to 'winsup/w32api/lib')
-rw-r--r--winsup/w32api/lib/Makefile.in151
-rw-r--r--winsup/w32api/lib/ddk/Makefile.in138
-rw-r--r--winsup/w32api/lib/directx/Makefile.in138
3 files changed, 79 insertions, 348 deletions
diff --git a/winsup/w32api/lib/Makefile.in b/winsup/w32api/lib/Makefile.in
index 8a8dca4a9..b569044cc 100644
--- a/winsup/w32api/lib/Makefile.in
+++ b/winsup/w32api/lib/Makefile.in
@@ -9,69 +9,21 @@
# but WITHOUT ANY WARANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-# start config section
-
-SHELL = @SHELL@
-
srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+top_builddir = @top_builddir@
+
VPATH = @srcdir@
+include ${top_builddir}/Makefile.comm
+
SUBDIRS := ddk directx
subdirs := ddk directx
-host_alias = @host@
-build_alias = @build@
-target_alias = @target@
-with_cross_host = @with_cross_host@
-prefix = @prefix@
-includedir:=@includedir@
-
-program_transform_name = @program_transform_name@
-exec_prefix = @exec_prefix@
-libdir:=@libdir@
-bindir = @bindir@
-ifeq ($(target_alias),$(host_alias))
-ifeq ($(build_alias),$(host_alias))
-tooldir:=$(exec_prefix)
-else
-tooldir:=$(exec_prefix)/$(target_alias)
-endif
-else
-tooldir:=$(exec_prefix)/$(target_alias)
-endif
-datadir = @datadir@
-infodir = @infodir@
-ifneq (,$(findstring cygwin,$(target_alias)))
-inst_includedir:=$(tooldir)/include/w32api
-inst_libdir:=$(tooldir)/lib/w32api
-else
-ifneq (,$(with_cross_host))
-inst_includedir:=$(tooldir)/include/w32api
-inst_libdir:=$(tooldir)/lib
-else
-inst_includedir:=$(includedir)
-inst_libdir:=$(libdir)
-endif
-endif
-
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-mkinstalldirs = mkdir -p
-
-CC = @CC@
-CC_FOR_TARGET = $(CC)
-
-DLLTOOL = @DLLTOOL@
-DLLTOOL_FLAGS = --as=$(AS) -k
-AS = @AS@
-AS_FOR_TARGET = $(AS_FOR_TARGET)
-WINDRES = @WINDRES@
-
# Depending on if we build as part of winsup or mingw we need to
# add additional include paths in order to get the correct headers
# from the C library.
+#
BUILDENV = @BUILDENV@
ifeq ($(BUILDENV), cygwin)
@@ -86,28 +38,21 @@ endif
INCLUDES = -I$(srcdir)/../include $(EXTRA_INCLUDES)
-CFLAGS = @CFLAGS@
-ALL_CFLAGS = $(CFLAGS) $(INCLUDES)
-
-RANLIB = @RANLIB@
-AR = @AR@
-LD = @LD@
-
-# end config section
-
-# headers
-
+# Headers
+#
HEADERS = $(notdir $(wildcard $(srcdir)/../include/*.h))
GL_HEADERS = $(notdir $(wildcard $(srcdir)/../include/GL/*.h))
GDIPLUS_HEADERS = $(notdir $(wildcard $(srcdir)/../include/gdiplus/*.h))
-# libraries
-
+# 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
+
+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 \
@@ -130,8 +75,11 @@ DISTFILES = Makefile.in $(DEF_FILES) $(MRI_FILES) $(SOURCES)
.NOTPARALLEL:
-# targets
-all: $(EXTRA_OBJS) $(LIBS) ddk directx
+# 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) ddk directx
%-subdirs:
for i in $(SUBDIRS); do \
@@ -164,52 +112,26 @@ test:
scrnsavw.o: scrnsave.c
$(CC) -c $(ALL_CFLAGS) -DUNICODE -o $@ $<
-# make rules
-
-.SUFFIXES: .c .o .def .a
-
-.c.o:
- $(CC) -c $(ALL_CFLAGS) -o $@ $<
-
-libuuid.a : $(UUID_OBJS)
+# 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
+#
+# 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) $@
-lib%.a : %.def %.o
- $(DLLTOOL) $(DLLTOOL_FLAGS) --output-lib $@ --def $(srcdir)/$*.def
- $(AR) r $@ $*.o
- $(RANLIB) $@
-
-lib%.a: %.def
- $(DLLTOOL) $(DLLTOOL_FLAGS) --output-lib $@ --def $<
-
-lib%.a: %.o
- $(AR) rc $@ $*.o
- $(RANLIB) $@
-
-need-DESTDIR-compatibility = prefix libdir includedir
-.PHONY: $(need-DESTDIR-compatibility) fail-DESTDIR-compatibility
-
-$(need-DESTDIR-compatibility):
- @test -z "$(DESTDIR)" || case "$($@)" in ?:*) \
- $(MAKE) --no-print-directory reject="$@" fail-DESTDIR-compatibility ;; \
- esac
-
-fail-DESTDIR-compatibility:
- $(error DESTDIR is not supported when $(reject) contains Win32 path `$($(reject))'; \
- try `make install $(reject)=$(shell echo '$($(reject))' | sed s,:,:$(DESTDIR),) ...' instead)
-
.PHONY: install install-libraries install-headers install-ddk
-# install headers and libraries in a target specified directory.
+# Install headers and libraries in a target specified directory.
+#
install: install-libraries install-headers install-ddk install-directx
install-libraries: all $(need-DESTDIR-compatibility)
@@ -238,7 +160,8 @@ install-ddk: install-libraries install-headers
install-directx: install-libraries install-headers
cd directx && $(MAKE) install
-# uninstall headers and libraries from a target specified directory
+# Uninstall headers and libraries from a target specified directory
+#
uninstall: uninstall-ddk uninstall-directx uninstall-libraries uninstall-headers
uninstall-libraries: $(need-DESTDIR-compatibility)
@@ -285,16 +208,4 @@ dist:
Makefile: Makefile.in ../config.status ../configure
cd ..; $(SHELL) config.status
-# clean
-
-mostlyclean:
- rm -f *~ *.o *.s
-
-clean:
- rm -f *.o *.a *.s *~
-
-distclean: clean
- rm -f config.cache config.status config.log Makefile
-
-maintainer-clean: distclean
-
+# Makefile.in: end of file
diff --git a/winsup/w32api/lib/ddk/Makefile.in b/winsup/w32api/lib/ddk/Makefile.in
index 3ac9c7c9f..5cc4dd601 100644
--- a/winsup/w32api/lib/ddk/Makefile.in
+++ b/winsup/w32api/lib/ddk/Makefile.in
@@ -1,3 +1,6 @@
+# @configure_input@
+#
+#
# Makefile.in
#
# This file is part of a free library building Windows NT drivers.
@@ -6,66 +9,18 @@
# but WITHOUT ANY WARANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-# start config section
-
-SHELL = @SHELL@
-
srcdir = @srcdir@
-VPATH = @srcdir@
-
-host_alias = @host@
-build_alias = @build@
-target_alias = @target@
-with_cross_host = @with_cross_host@
-prefix = @prefix@
-includedir:=@includedir@
-
-program_transform_name = @program_transform_name@
-exec_prefix = @exec_prefix@
-libdir:=@libdir@
-bindir = @bindir@
-ifeq ($(target_alias),$(host_alias))
-ifeq ($(build_alias),$(host_alias))
-tooldir:=$(exec_prefix)
-else
-tooldir:=$(exec_prefix)/$(target_alias)
-endif
-else
-tooldir:=$(exec_prefix)/$(target_alias)
-endif
-datadir = @datadir@
-infodir = @infodir@
-ifneq (,$(findstring cygwin,$(target_alias)))
-inst_includedir:=$(tooldir)/include/w32api
-inst_libdir:=$(tooldir)/lib/w32api
-else
-ifneq (,$(with_cross_host))
-inst_includedir:=$(tooldir)/include/w32api
-inst_libdir:=$(tooldir)/lib
-else
-inst_includedir:=$(includedir)
-inst_libdir:=$(libdir)
-endif
-endif
-
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-mkinstalldirs = mkdir -p
+top_srcdir = @top_srcdir@
+top_builddir = @top_builddir@
-CC = @CC@
-CC_FOR_TARGET = $(CC)
+VPATH = @srcdir@
-DLLTOOL = @DLLTOOL@
-DLLTOOL_FLAGS = --as=$(AS) -k
-AS = @AS@
-AS_FOR_TARGET = $(AS_FOR_TARGET)
-WINDRES = @WINDRES@
+include ${top_builddir}/Makefile.comm
# Depending on if we build as part of winsup or mingw we need to
# add additional include paths in order to get the correct headers
# from the C library.
+#
BUILDENV = @BUILDENV@
ifeq ($(BUILDENV), cygwin)
@@ -80,21 +35,12 @@ endif
INCLUDES = -I$(srcdir)/../include $(EXTRA_INCLUDES)
-CFLAGS = @CFLAGS@
-ALL_CFLAGS = $(CFLAGS) $(INCLUDES)
-
-RANLIB = @RANLIB@
-AR = @AR@
-LD = @LD@
-
-# end config section
-
-# headers
-
+# Headers
+#
HEADERS = $(notdir $(wildcard $(srcdir)/../../include/ddk/*.h))
-# libraries
-
+# Libraries
+#
DEF_FILES = $(notdir $(wildcard $(srcdir)/*.def))
IMPLIBS = $(addprefix lib,$(subst .def,.a,$(DEF_FILES)))
LIBS = $(IMPLIBS)
@@ -103,8 +49,11 @@ DISTFILES = Makefile.in $(DEF_FILES)
.NOTPARALLEL:
-# targets
-all: $(LIBS)
+# 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: $(LIBS)
TEST_OPTIONS = $(ALL_CFLAGS) -Wall -pedantic -Wsystem-headers -c $(srcdir)/test.c -o test.o
.PHONY: test
@@ -122,38 +71,10 @@ test:
@$(WINDRES) --define UNICODE --include-dir $(INCDIR) -i $(srcdir)/res.rc -o test.o
@rm -f test.o
-# make rules
-
-.SUFFIXES: .c .o .def .a
-
-.c.o:
- $(CC) -c $(ALL_CFLAGS) -o $@ $<
-
-lib%.a : %.def %.o
- $(DLLTOOL) $(DLLTOOL_FLAGS) --output-lib $@ --def $(srcdir)/$*.def
- $(AR) r $@ $*.o
- $(RANLIB) $@
-
-lib%.a: %.def
- $(DLLTOOL) $(DLLTOOL_FLAGS) --output-lib $@ --def $<
-
-lib%.a: %.o
- $(AR) rc $@ $*.o
- $(RANLIB) $@
-
-need-DESTDIR-compatibility = prefix libdir includedir
-.PHONY: $(need-DESTDIR-compatibility) fail-DESTDIR-compatibility
-
-$(need-DESTDIR-compatibility):
- @test -z "$(DESTDIR)" || case "$($@)" in ?:*) \
- $(MAKE) --no-print-directory reject="$@" fail-DESTDIR-compatibility ;; \
- esac
-
-fail-DESTDIR-compatibility:
- $(error DESTDIR is not supported when $(reject) contains Win32 path `$($(reject))'; \
- try `make install $(reject)=$(shell echo '$($(reject))' | sed s,:,:$(DESTDIR),) ...' instead)
-
-# install headers and libraries in a target specified directory.
+# Rules
+#
+# Install headers and libraries in a target specified directory.
+#
install: install-libraries install-headers
install-libraries: all $(need-DESTDIR-compatibility)
@@ -170,7 +91,8 @@ install-headers: $(need-DESTDIR-compatibility)
$(INSTALL_DATA) $(srcdir)/../../include/ddk/$$i $(DESTDIR)${ddk_includedir}; \
done
-# uninstall headers and libraries from a target specified directory
+# Uninstall headers and libraries from a target specified directory
+#
uninstall: uninstall-libraries uninstall-headers
uninstall-libraries: $(need-DESTDIR-compatibility)
@@ -185,7 +107,6 @@ uninstall-headers: $(need-DESTDIR-compatibility)
done
rmdir $(DESTDIR)${ddk_includedir}
-
dist:
mkdir $(distdir)/include/ddk
chmod 755 $(distdir)/include/ddk
@@ -201,15 +122,4 @@ dist:
Makefile: Makefile.in ../../config.status ../../configure
cd ../..; $(SHELL) config.status
-# clean
-
-mostlyclean:
- rm -f *~ *.o *.s
-
-clean:
- rm -f *.o *.a *.s *~
-
-distclean: clean
- rm -f config.cache config.status config.log Makefile
-
-maintainer-clean: distclean
+# Makefile.in: end of file
diff --git a/winsup/w32api/lib/directx/Makefile.in b/winsup/w32api/lib/directx/Makefile.in
index 89a3cc602..b3b956342 100644
--- a/winsup/w32api/lib/directx/Makefile.in
+++ b/winsup/w32api/lib/directx/Makefile.in
@@ -1,3 +1,6 @@
+# @configure_input@
+#
+#
# Makefile.in
#
# This file is part of a free library building Windows NT drivers.
@@ -6,66 +9,18 @@
# but WITHOUT ANY WARANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-# start config section
-
-SHELL = @SHELL@
-
srcdir = @srcdir@
-VPATH = @srcdir@
-
-host_alias = @host@
-build_alias = @build@
-target_alias = @target@
-with_cross_host = @with_cross_host@
-prefix = @prefix@
-includedir:=@includedir@
-
-program_transform_name = @program_transform_name@
-exec_prefix = @exec_prefix@
-libdir:=@libdir@
-bindir = @bindir@
-ifeq ($(target_alias),$(host_alias))
-ifeq ($(build_alias),$(host_alias))
-tooldir:=$(exec_prefix)
-else
-tooldir:=$(exec_prefix)/$(target_alias)
-endif
-else
-tooldir:=$(exec_prefix)/$(target_alias)
-endif
-datadir = @datadir@
-infodir = @infodir@
-ifneq (,$(findstring cygwin,$(target_alias)))
-inst_includedir:=$(tooldir)/include/w32api
-inst_libdir:=$(tooldir)/lib/w32api
-else
-ifneq (,$(with_cross_host))
-inst_includedir:=$(tooldir)/include/w32api
-inst_libdir:=$(tooldir)/lib
-else
-inst_includedir:=$(includedir)
-inst_libdir:=$(libdir)
-endif
-endif
+top_srcdir = @top_srcdir@
+top_builddir = @top_builddir@
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-mkinstalldirs = mkdir -p
-
-CC = @CC@
-CC_FOR_TARGET = $(CC)
+VPATH = @srcdir@
-DLLTOOL = @DLLTOOL@
-DLLTOOL_FLAGS = --as=$(AS) -k
-AS = @AS@
-AS_FOR_TARGET = $(AS_FOR_TARGET)
-WINDRES = @WINDRES@
+include ${top_builddir}/Makefile.comm
# Depending on if we build as part of winsup or mingw we need to
# add additional include paths in order to get the correct headers
# from the C library.
+#
BUILDENV = @BUILDENV@
ifeq ($(BUILDENV), cygwin)
@@ -80,21 +35,12 @@ endif
INCLUDES = -I$(srcdir)/../include -I$(srcdir)/../include/directx $(EXTRA_INCLUDES)
-CFLAGS = @CFLAGS@
-ALL_CFLAGS = $(CFLAGS) $(INCLUDES)
-
-RANLIB = @RANLIB@
-AR = @AR@
-LD = @LD@
-
-# end config section
-
-# headers
-
+# Headers
+#
HEADERS = $(notdir $(wildcard $(srcdir)/../../include/directx/*.h))
-# libraries
-
+# Libraries
+#
DEF_FILES = $(notdir $(wildcard $(srcdir)/*.def))
DIST_C_FILES = $(notdir $(wildcard $(srcdir)/*.c))
DIST_H_FILES = $(notdir $(wildcard $(srcdir)/*.h))
@@ -110,8 +56,11 @@ DISTFILES = Makefile.in $(DEF_FILES) $(DIST_C_FILES) $(DIST_H_FILES)
.NOTPARALLEL:
-# targets
-all: $(LIBS)
+# 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: $(LIBS)
TEST_OPTIONS = $(ALL_CFLAGS) -Wall -pedantic -Wsystem-headers -c $(srcdir)/test.c -o test.o
.PHONY: test
@@ -129,13 +78,8 @@ test:
@$(WINDRES) --define UNICODE --include-dir $(INCDIR) -i $(srcdir)/res.rc -o test.o
@rm -f test.o
-# make rules
-
-.SUFFIXES: .c .o .def .a
-
-.c.o:
- $(CC) -c $(ALL_CFLAGS) -o $@ $<
-
+# Rules
+#
libdxerr8.a: dxerr8.o dxerr8w.o
$(AR) r $@ dxerr8.o dxerr8w.o
$(RANLIB) $@
@@ -154,31 +98,8 @@ libdinput8.a: dinput8.def $(DINPUT_OBJS)
$(AR) r $@ $(DINPUT_OBJS)
$(RANLIB) $@
-lib%.a: %.def %.o
- $(DLLTOOL) $(DLLTOOL_FLAGS) --output-lib $@ --def $(srcdir)/$*.def
- $(AR) r $@ $*.o
- $(RANLIB) $@
-
-lib%.a: %.def
- $(DLLTOOL) $(DLLTOOL_FLAGS) --output-lib $@ --def $<
-
-lib%.a: %.o
- $(AR) rc $@ $*.o
- $(RANLIB) $@
-
-need-DESTDIR-compatibility = prefix libdir includedir
-.PHONY: $(need-DESTDIR-compatibility) fail-DESTDIR-compatibility
-
-$(need-DESTDIR-compatibility):
- @test -z "$(DESTDIR)" || case "$($@)" in ?:*) \
- $(MAKE) --no-print-directory reject="$@" fail-DESTDIR-compatibility ;; \
- esac
-
-fail-DESTDIR-compatibility:
- $(error DESTDIR is not supported when $(reject) contains Win32 path `$($(reject))'; \
- try `make install $(reject)=$(shell echo '$($(reject))' | sed s,:,:$(DESTDIR),) ...' instead)
-
-# install headers and libraries in a target specified directory.
+# Install headers and libraries in a target specified directory.
+#
install: install-libraries install-headers
install-libraries: all $(need-DESTDIR-compatibility)
@@ -193,7 +114,8 @@ install-headers: $(need-DESTDIR-compatibility)
$(INSTALL_DATA) $(srcdir)/../../include/directx/$$i $(DESTDIR)$(inst_includedir)/$$i ; \
done
-# uninstall headers and libraries from a target specified directory
+# Uninstall headers and libraries from a target specified directory
+#
uninstall: uninstall-libraries uninstall-headers
uninstall-libraries: $(need-DESTDIR-compatibility)
@@ -208,7 +130,6 @@ uninstall-headers: $(need-DESTDIR-compatibility)
done
rmdir $(DESTDIR)$(inst_includedir)
-
dist:
mkdir $(distdir)/include/directx
chmod 755 $(distdir)/include/directx
@@ -224,15 +145,4 @@ dist:
Makefile: Makefile.in ../../config.status ../../configure
cd ../..; $(SHELL) config.status
-# clean
-
-mostlyclean:
- rm -f *~ *.o *.s
-
-clean:
- rm -f *.o *.a *.s *~
-
-distclean: clean
- rm -f config.cache config.status config.log Makefile
-
-maintainer-clean: distclean
+# Makefile.in: end of file