newlib/winsup/Makefile.common
Corinna Vinschen 6e623e9320 Switching the Cygwin DLL to LGPLv3+, dropping commercial buyout option
Bump GPLv2+ to GPLv3+ for some files, clarify BSD 2-clause.

Everything else stays under GPLv3+.

New Linking Exception exempts resulting executables from LGPLv3 section 4.

Add CONTRIBUTORS file to keep track of licensing.

Remove 'Copyright Red Hat Inc' comments.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-06-23 10:09:17 +02:00

54 lines
1.3 KiB
Makefile

# Makefile.common - common definitions for the winsup directory
#
# This file is part of Cygwin.
#
# This software is a copyrighted work licensed under the terms of the
# Cygwin license. Please consult the file "CYGWIN_LICENSE" for
# details.
define justdir
$(patsubst %/,%,$(dir $1))
endef
define libname
$(realpath $(shell ${CC} --print-file-name=$1 $2))
endef
export PATH:=${winsup_srcdir}:${PATH}
# Allow CFLAGS=-O,-g to control CXXFLAGS too
opt=$(filter -O%,${CFLAGS}) $(filter -g%,${CFLAGS})
override CXXFLAGS:=${filter-out -g%,$(filter-out -O%,${CXXFLAGS})} ${opt}
cflags_common:=-Wall -Wstrict-aliasing -Wwrite-strings -fno-common -pipe -fbuiltin -fmessage-length=0
COMPILE.cc=c++wrap ${CXXFLAGS} -fno-rtti -fno-exceptions -fno-use-cxa-atexit ${cflags_common}
COMPILE.c=ccwrap ${CFLAGS} ${cflags_common}
top_srcdir:=$(call justdir,${winsup_srcdir})
top_builddir:=$(call justdir,${target_builddir})
cygwin_build:=${target_builddir}/winsup/cygwin
newlib_build:=${target_builddir}/newlib
nostdlib:=-nostdlib
VPATH:=${srcdir}
.SUFFIXES:
.SUFFIXES: .c .cc .def .S .a .o .d .s .E
%.o: %.cc
$(strip ${COMPILE.cc} -c -o $@ $<)
%.o: %.c
$(strip ${COMPILE.c} -c -o $@ $<)
%.E: %.cc
$(strip ${COMPILE.cc} -E -dD -o $@ $<)
%.E: %.c
$(strip ${COMPILE.c} -E -dD -o $@ $<)
%.o: %.S
$(strip ${COMPILE.S} -c -o $@ $<)