mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-02-01 12:00:35 +08:00
b55e3f1916
ccwrap massages the compiler's standard include directories to remove '/usr/include/w32api', with the intent of allowing it to be overriden by '--with-windows-headers' (See 4c36016b). I'm not 100% convinced that this is always working as desired, since in some places w32api includes are done using <w32api/something.h>, which will find them via the path /usr/include. If this does turn out to be needed, this could also be implemented by constructing the appropriate compiler flags once, rather than on every compiler invocation.
84 lines
2.3 KiB
Makefile
84 lines
2.3 KiB
Makefile
# Makefile for Cygwin server
|
|
|
|
# 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.
|
|
|
|
srcdir:=@srcdir@
|
|
target_builddir:=@target_builddir@
|
|
winsup_srcdir:=@winsup_srcdir@
|
|
configure_args=@configure_args@
|
|
|
|
CFLAGS:=@CFLAGS@
|
|
override CXXFLAGS=@CXXFLAGS@
|
|
override CXXFLAGS+=-MMD -Wimplicit-fallthrough=5 -Werror -D__OUTSIDE_CYGWIN__ -DSYSCONFDIR="\"$(sysconfdir)\""
|
|
INCLUDES:=@INCLUDES@
|
|
|
|
include ${srcdir}/../Makefile.common
|
|
|
|
cygwin_build:=${target_builddir}/winsup/cygwin
|
|
|
|
DESTDIR=
|
|
prefix:=${DESTDIR}@prefix@
|
|
exec_prefix:=${DESTDIR}@exec_prefix@
|
|
bindir:=${DESTDIR}@bindir@
|
|
sbindir:=${DESTDIR}@sbindir@
|
|
sysconfdir:=${DESTDIR}@sysconfdir@
|
|
program_transform_name:=@program_transform_name@
|
|
|
|
INSTALL:=@INSTALL@
|
|
INSTALL_PROGRAM:=@INSTALL_PROGRAM@
|
|
INSTALL_DATA:=@INSTALL_DATA@
|
|
|
|
AR:=@AR@
|
|
|
|
|
|
OBJS:= cygserver.o client.o process.o msg.o sem.o shm.o threaded_queue.o \
|
|
transport.o transport_pipes.o \
|
|
bsd_helper.o bsd_log.o bsd_mutex.o \
|
|
sysv_msg.o sysv_sem.o sysv_shm.o setpwd.o pwdgrp.o
|
|
LIBOBJS:=${patsubst %.o,lib%.o,$(OBJS)}
|
|
|
|
CYGWIN_OBJS:=$(cygwin_build)/version.o
|
|
|
|
CYGWIN_LIB:=$(cygwin_build)/libcygwin.a
|
|
|
|
all: cygserver.exe
|
|
|
|
install: all cygserver.conf cygserver-config README
|
|
/bin/mkdir -p $(DESTDIR)$(sbindir) $(DESTDIR)$(bindir) $(DESTDIR)$(sysconfdir)/defaults/etc $(DESTDIR)$(prefix)/share/doc/Cygwin
|
|
$(INSTALL_PROGRAM) cygserver.exe $(DESTDIR)$(sbindir)/cygserver.exe
|
|
$(INSTALL_PROGRAM) $(srcdir)/cygserver-config $(DESTDIR)$(bindir)/cygserver-config
|
|
$(INSTALL_DATA) $(srcdir)/cygserver.conf $(DESTDIR)$(sysconfdir)/defaults/etc/cygserver.conf
|
|
$(INSTALL_DATA) $(srcdir)/README $(DESTDIR)$(prefix)/share/doc/Cygwin/cygserver.README
|
|
|
|
clean:
|
|
rm -f $(OBJS) ${patsubst %.o,%.d,$(OBJS)} cygserver.exe
|
|
|
|
libclean:
|
|
rm -f $(LIBOBJS) ${patsubst %.o,%.d,$(LIBOBJS)} libcygserver.a
|
|
|
|
fullclean: clean libclean
|
|
|
|
cygserver.exe: $(CYGWIN_LIB) $(OBJS) $(CYGWIN_OBJS)
|
|
$(CXX) -o $@ ${wordlist 2,999,$^} -static -static-libgcc -B$(cygwin_build) -lntdll
|
|
|
|
$(cygwin_build)/%.o:
|
|
$(MAKE) -C $(@D) $(@F)
|
|
|
|
Makefile: Makefile.in configure
|
|
./config.status
|
|
|
|
lib%.o: %.cc
|
|
${filter-out -D__OUTSIDE_CYGWIN__, $(COMPILE.cc)} -c -o $(@D)/${basename $(@F)}.o $<
|
|
|
|
libcygserver.a: $(LIBOBJS)
|
|
$(AR) crus $@ $?
|
|
|
|
deps:=${wildcard *.d}
|
|
ifneq (,$(deps))
|
|
include $(deps)
|
|
endif
|