2003-07-02 05:09:30 +08:00
|
|
|
# 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@
|
2012-11-23 21:22:47 +08:00
|
|
|
target_builddir:=@target_builddir@
|
|
|
|
winsup_srcdir:=@winsup_srcdir@
|
|
|
|
configure_args=@configure_args@
|
|
|
|
|
|
|
|
export CC:=@CC@
|
|
|
|
export CXX:=@CXX@
|
|
|
|
|
2012-11-28 11:23:41 +08:00
|
|
|
CFLAGS:=@CFLAGS@
|
|
|
|
override CXXFLAGS=@CXXFLAGS@
|
2020-08-07 21:48:28 +08:00
|
|
|
override CXXFLAGS+=-MMD -Wimplicit-fallthrough=5 -Werror -D__OUTSIDE_CYGWIN__ -DSYSCONFDIR="\"$(sysconfdir)\""
|
2012-11-28 11:23:41 +08:00
|
|
|
|
2012-11-23 21:22:47 +08:00
|
|
|
include ${srcdir}/../Makefile.common
|
|
|
|
|
|
|
|
cygwin_build:=${target_builddir}/winsup/cygwin
|
|
|
|
|
|
|
|
# environment variables used by ccwrap
|
|
|
|
export CCWRAP_HEADERS:=$(dir ${srcdir})/cygwin ${cygwin_build}
|
|
|
|
export CCWRAP_SYSTEM_HEADERS:=@cygwin_headers@ @newlib_headers@
|
|
|
|
export CCWRAP_DIRAFTER_HEADERS:=@windows_headers@
|
2003-07-02 05:09:30 +08:00
|
|
|
|
2008-10-30 21:17:42 +08:00
|
|
|
DESTDIR=
|
|
|
|
prefix:=${DESTDIR}@prefix@
|
|
|
|
exec_prefix:=${DESTDIR}@exec_prefix@
|
|
|
|
bindir:=${DESTDIR}@bindir@
|
|
|
|
sbindir:=${DESTDIR}@sbindir@
|
|
|
|
sysconfdir:=${DESTDIR}@sysconfdir@
|
2003-07-02 05:09:30 +08:00
|
|
|
program_transform_name:=@program_transform_name@
|
|
|
|
|
|
|
|
INSTALL:=@INSTALL@
|
|
|
|
INSTALL_PROGRAM:=@INSTALL_PROGRAM@
|
|
|
|
INSTALL_DATA:=@INSTALL_DATA@
|
|
|
|
|
2003-08-26 02:22:07 +08:00
|
|
|
AR:=@AR@
|
2003-07-02 05:09:30 +08:00
|
|
|
|
|
|
|
|
2003-08-31 00:34:56 +08:00
|
|
|
OBJS:= cygserver.o client.o process.o msg.o sem.o shm.o threaded_queue.o \
|
2007-08-02 22:23:22 +08:00
|
|
|
transport.o transport_pipes.o \
|
2003-11-20 02:49:41 +08:00
|
|
|
bsd_helper.o bsd_log.o bsd_mutex.o \
|
2014-03-13 01:37:04 +08:00
|
|
|
sysv_msg.o sysv_sem.o sysv_shm.o setpwd.o pwdgrp.o
|
2003-08-26 02:22:07 +08:00
|
|
|
LIBOBJS:=${patsubst %.o,lib%.o,$(OBJS)}
|
2003-07-02 05:09:30 +08:00
|
|
|
|
2008-02-07 06:01:30 +08:00
|
|
|
CYGWIN_OBJS:=$(cygwin_build)/version.o
|
2003-07-02 05:09:30 +08:00
|
|
|
|
2003-11-27 04:05:09 +08:00
|
|
|
CYGWIN_LIB:=$(cygwin_build)/libcygwin.a
|
|
|
|
|
2003-10-22 18:04:11 +08:00
|
|
|
all: cygserver.exe
|
2003-07-02 05:09:30 +08:00
|
|
|
|
2012-11-23 22:52:07 +08:00
|
|
|
install: all cygserver.conf cygserver-config README
|
|
|
|
/bin/mkdir -p $(DESTDIR)$(sbindir) $(DESTDIR)$(bindir) $(DESTDIR)$(sysconfdir)/defaults/etc $(DESTDIR)$(prefix)/share/doc/Cygwin
|
2009-02-24 10:11:14 +08:00
|
|
|
$(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
|
2003-07-02 05:09:30 +08:00
|
|
|
|
2003-07-02 10:31:32 +08:00
|
|
|
clean:
|
2003-11-20 02:49:41 +08:00
|
|
|
rm -f $(OBJS) ${patsubst %.o,%.d,$(OBJS)} cygserver.exe
|
|
|
|
|
|
|
|
libclean:
|
|
|
|
rm -f $(LIBOBJS) ${patsubst %.o,%.d,$(LIBOBJS)} libcygserver.a
|
|
|
|
|
|
|
|
fullclean: clean libclean
|
2003-07-02 10:31:32 +08:00
|
|
|
|
2008-02-07 06:01:30 +08:00
|
|
|
cygserver.exe: $(CYGWIN_LIB) $(OBJS) $(CYGWIN_OBJS)
|
2013-04-23 17:44:36 +08:00
|
|
|
$(CXX) -o $@ ${wordlist 2,999,$^} -static -static-libgcc -B$(cygwin_build) -lntdll
|
2003-07-02 10:31:32 +08:00
|
|
|
|
2015-01-28 19:46:25 +08:00
|
|
|
$(cygwin_build)/%.o:
|
|
|
|
$(MAKE) -C $(@D) $(@F)
|
2003-07-02 10:31:32 +08:00
|
|
|
|
|
|
|
Makefile: Makefile.in configure
|
2012-11-23 21:22:47 +08:00
|
|
|
./config.status
|
2003-08-26 02:22:07 +08:00
|
|
|
|
|
|
|
lib%.o: %.cc
|
2012-11-23 21:22:47 +08:00
|
|
|
${filter-out -D__OUTSIDE_CYGWIN__, $(COMPILE.cc)} -c -o $(@D)/${basename $(@F)}.o $<
|
2003-08-26 02:22:07 +08:00
|
|
|
|
|
|
|
libcygserver.a: $(LIBOBJS)
|
|
|
|
$(AR) crus $@ $?
|
2003-11-20 02:49:41 +08:00
|
|
|
|
|
|
|
deps:=${wildcard *.d}
|
|
|
|
ifneq (,$(deps))
|
|
|
|
include $(deps)
|
|
|
|
endif
|