More makefile code refactoring; fix top_srcdir references.
This commit is contained in:
@@ -19,29 +19,13 @@ VPATH = @srcdir@
|
||||
|
||||
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)
|
||||
# winsup/include
|
||||
# winsup/../newlib/libc/include
|
||||
# winsup/../newlib/libc/sys/cygwin
|
||||
EXTRA_INCLUDES = -I${srcdir}/../../include -I${srcdir}/../../../newlib/libc/include -I${srcdir}/../../../newlib/libc/sys/cygwin
|
||||
endif
|
||||
ifeq ($(BUILDENV), mingw)
|
||||
EXTRA_INCLUDES = -I${srcdir}/../../mingw/include
|
||||
endif
|
||||
|
||||
INCLUDES = -I${srcdir}/../include $(EXTRA_INCLUDES)
|
||||
INCLUDES = -I ${top_srcdir}/include $(EXTRA_INCLUDES)
|
||||
|
||||
# Headers
|
||||
#
|
||||
HEADERS = $(notdir $(wildcard ${srcdir}/../include/*.h))
|
||||
GL_HEADERS = $(notdir $(wildcard ${srcdir}/../include/GL/*.h))
|
||||
GDIPLUS_HEADERS = $(notdir $(wildcard ${srcdir}/../include/gdiplus/*.h))
|
||||
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
|
||||
#
|
||||
@@ -152,15 +136,15 @@ install-libraries: all $(need-DESTDIR-compatibility)
|
||||
install-headers: $(need-DESTDIR-compatibility)
|
||||
$(mkinstalldirs) $(DESTDIR)${inst_includedir}
|
||||
for file in $(HEADERS); do \
|
||||
$(INSTALL_DATA) ${srcdir}/../include/$$file $(DESTDIR)${inst_includedir}; \
|
||||
$(INSTALL_DATA) ${top_srcdir}/include/$$file $(DESTDIR)${inst_includedir}; \
|
||||
done
|
||||
$(mkinstalldirs) $(DESTDIR)${inst_includedir}/GL
|
||||
for file in $(GL_HEADERS); do \
|
||||
$(INSTALL_DATA) ${srcdir}/../include/GL/$$file $(DESTDIR)${inst_includedir}/GL; \
|
||||
$(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) ${srcdir}/../include/gdiplus/$$file $(DESTDIR)${inst_includedir}/gdiplus; \
|
||||
$(INSTALL_DATA) ${top_srcdir}/include/gdiplus/$$file $(DESTDIR)${inst_includedir}/gdiplus; \
|
||||
done
|
||||
|
||||
install-ddk: install-libraries install-headers
|
||||
@@ -195,15 +179,15 @@ dist:
|
||||
mkdir ${distdir}/include
|
||||
chmod 755 ${distdir}/include
|
||||
for file in $(HEADERS); do \
|
||||
cp -p ${srcdir}/../include/$$file ${distdir}/include; \
|
||||
cp -p ${top_srcdir}/include/$$file ${distdir}/include; \
|
||||
done
|
||||
mkdir ${distdir}/include/GL
|
||||
for file in $(GL_HEADERS); do \
|
||||
cp -p ${srcdir}/../include/GL/$$file ${distdir}/include/GL; \
|
||||
cp -p ${top_srcdir}/include/GL/$$file ${distdir}/include/GL; \
|
||||
done
|
||||
mkdir ${distdir}/include/gdiplus
|
||||
for file in $(GDIPLUS_HEADERS); do \
|
||||
cp -p ${srcdir}/../include/gdiplus/$$file ${distdir}/include/gdiplus; \
|
||||
cp -p ${top_srcdir}/include/gdiplus/$$file ${distdir}/include/gdiplus; \
|
||||
done
|
||||
mkdir ${distdir}/lib
|
||||
chmod 755 ${distdir}/lib
|
||||
|
@@ -16,28 +16,11 @@ top_builddir = @top_builddir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
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)
|
||||
# winsup/include
|
||||
# winsup/../newlib/libc/include
|
||||
# winsup/../newlib/libc/sys/cygwin
|
||||
EXTRA_INCLUDES = -I${srcdir}/../../include -I${srcdir}/../../../newlib/libc/include -I${srcdir}/../../../newlib/libc/sys/cygwin
|
||||
endif
|
||||
ifeq ($(BUILDENV), mingw)
|
||||
EXTRA_INCLUDES = -I${srcdir}/../../mingw/include
|
||||
endif
|
||||
|
||||
INCLUDES = -I${srcdir}/../include $(EXTRA_INCLUDES)
|
||||
INCLUDES = -I ${top_srcdir}/include $(EXTRA_INCLUDES)
|
||||
|
||||
# Headers
|
||||
#
|
||||
HEADERS = $(notdir $(wildcard ${srcdir}/../../include/ddk/*.h))
|
||||
HEADERS = $(notdir $(wildcard ${top_srcdir}/include/ddk/*.h))
|
||||
|
||||
# Libraries
|
||||
#
|
||||
@@ -91,7 +74,7 @@ ddk_includedir = ${inst_includedir}/ddk
|
||||
install-headers: $(need-DESTDIR-compatibility)
|
||||
$(mkinstalldirs) $(DESTDIR)${ddk_includedir}
|
||||
for file in $(HEADERS); do \
|
||||
$(INSTALL_DATA) ${srcdir}/../../include/ddk/$$file $(DESTDIR)${ddk_includedir}; \
|
||||
$(INSTALL_DATA) ${top_srcdir}/include/ddk/$$file $(DESTDIR)${ddk_includedir}; \
|
||||
done
|
||||
|
||||
# Uninstall headers and libraries from a target specified directory
|
||||
@@ -114,7 +97,7 @@ dist:
|
||||
mkdir ${distdir}/include/ddk
|
||||
chmod 755 ${distdir}/include/ddk
|
||||
for file in $(HEADERS); do \
|
||||
cp -p ${srcdir}/../../include/ddk/$$file ${distdir}/include/ddk; \
|
||||
cp -p ${top_srcdir}/include/ddk/$$file ${distdir}/include/ddk; \
|
||||
done
|
||||
mkdir ${distdir}/lib/ddk
|
||||
chmod 755 ${distdir}/lib/ddk
|
||||
|
@@ -16,31 +16,12 @@ top_builddir = @top_builddir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
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)
|
||||
# winsup/include
|
||||
# winsup/../newlib/libc/include
|
||||
# winsup/../newlib/libc/sys/cygwin
|
||||
EXTRA_INCLUDES = -I ${srcdir}/../../include \
|
||||
-I ${srcdir}/../../../newlib/libc/include \
|
||||
-I ${srcdir}/../../../newlib/libc/sys/cygwin
|
||||
endif
|
||||
ifeq ($(BUILDENV), mingw)
|
||||
EXTRA_INCLUDES = -I ${srcdir}/../../mingw/include
|
||||
endif
|
||||
|
||||
INCLUDES = -I ${srcdir}/../include -I ${srcdir}/../include/directx \
|
||||
INCLUDES = -I ${top_srcdir}/include -I ${top_srcdir}/include/directx \
|
||||
$(EXTRA_INCLUDES)
|
||||
|
||||
# Headers
|
||||
#
|
||||
HEADERS = $(notdir $(wildcard ${srcdir}/../../include/directx/*.h))
|
||||
HEADERS = $(notdir $(wildcard ${top_srcdir}/include/directx/*.h))
|
||||
|
||||
# Libraries
|
||||
#
|
||||
@@ -70,7 +51,7 @@ all-default: $(LIBS)
|
||||
|
||||
TEST_OPTIONS = \
|
||||
$(ALL_CFLAGS) -Wall -pedantic -Wsystem-headers \
|
||||
-c $(srcdir)/test.c -o test.o
|
||||
-c ${srcdir}/test.c -o test.o
|
||||
.PHONY: test
|
||||
test:
|
||||
@echo "Testing directx..."
|
||||
@@ -119,7 +100,7 @@ install-libraries: all $(need-DESTDIR-compatibility)
|
||||
install-headers: $(need-DESTDIR-compatibility)
|
||||
$(mkinstalldirs) $(DESTDIR)${inst_includedir}
|
||||
for file in $(HEADERS); do \
|
||||
$(INSTALL_DATA) ${srcdir}/../../include/directx/$$file $(DESTDIR)${inst_includedir}; \
|
||||
$(INSTALL_DATA) ${top_srcdir}/include/directx/$$file $(DESTDIR)${inst_includedir}; \
|
||||
done
|
||||
|
||||
# Uninstall headers and libraries from a target specified directory
|
||||
@@ -142,7 +123,7 @@ dist:
|
||||
mkdir ${distdir}/include/directx
|
||||
chmod 755 ${distdir}/include/directx
|
||||
for file in $(HEADERS); do \
|
||||
cp -p ${srcdir}/../../include/directx/$$file ${distdir}/include/directx; \
|
||||
cp -p ${top_srcdir}/include/directx/$$file ${distdir}/include/directx; \
|
||||
done
|
||||
mkdir ${distdir}/lib/directx
|
||||
chmod 755 ${distdir}/lib/directx
|
||||
|
Reference in New Issue
Block a user