4c36016b57
2012-11-12 Christopher Faylor <me.cygwin2012@cgf.cx> * Makefile.common: Revamp for new configury. Add default compilation targets, include .E processing. Add magic for allowing "CFLAGS" to control optimization options in "CXXFLAGS". * configure.cygwin: New include for Cygwin configure.in's. * acinclude.m4: Delete old definitions. Implement AC_WINDOWS_HEADERS, AC_WINDOWS_LIBS, AC_CYGWIN_INCLUDES, target_builddir, winsup_srcdir. * aclocal.m4: Regenerate. * autogen.sh: New file. * ccwrap: New script. * c++wrap: New script. * config.guess: New script. * config.sub: New script. * configure: Regenerate. * configure.in: Eliminate LIB_AC_PROG_* calls in favor of standard. Delete ancient target test. * install-sh: New script. cygserver/ChangeLog: 2012-11-12 Christopher Faylor <me.cygwin2012@cgf.cx> * Makefile.in: Revamp for new configury. * configure.in: Revamp for new configury. * aclocal.m4: Regenerate. * configure: Ditto. * autogen.sh: New script. cygwin/ChangeLog: 2012-11-22 Christopher Faylor <me.cygwin2012@cgf.cx> * select.cc (select): Don't return -1 when we've timed out after looping. 2012-11-22 Christopher Faylor <me.cygwin2012@cgf.cx> * Makefile.in: Revamp for new configury. (datarootdir): Add variable setting. (winver_stamp): Accommodate changes to mkvers.sh setting. (libc.a): Fix race when libm.a might not have been built yet. * configure.in: Revamp for new configury. * aclocal.m4: Regenerate. * configure: Ditto. * autogen.sh: New script. * mkvers.sh: Find include directives via CFLAGS and friends rather than assuming that w32api lives nearby. utils/ChangeLog: 2012-11-12 Christopher Faylor <me.cygwin2012@cgf.cx> * aclocal.m4: Regenerate. * configure: Ditto. * autogen.sh: New script. * configure.in: Revamp for new configury. * Makefile.in: Revamp for new configury. Rename ALL_* to just *. Always use "VERBOSE" setting. (MINGW_CXX): Don't include CFLAGS in definition. (all): Define target first, before everything else so that it is the default. (ps.exe): Don't add useless -lcygwin. (ldh.exe): For consistency, add to existing MINGW_LDFLAGS rather than redefining them. (cygcheck.exe): Always include -lz for MINGW_LDFLAGS. Don't try to figure out where to find it. (dumper.exe): Simplify check. Assume libraries are installed rather than trying to retrieve from source tree. (install): Just use /bin/mkdir to create directories. (Makefile): Regenerate when standard dependencies change. * dump_setup.cc: Always include zlib.h. Remove accommodations for it possibly not existing. * parse_pe.cc: Add define which allows building with installed binutils package. * dumper.cc: Ditto.
97 lines
2.8 KiB
Makefile
97 lines
2.8 KiB
Makefile
# Makefile for Cygwin server
|
|
# Copyright 2003, 2006, 2007, 2008, 2009 Red Hat, Inc.
|
|
|
|
# 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@
|
|
|
|
export CC:=@CC@
|
|
export CXX:=@CXX@
|
|
|
|
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@
|
|
|
|
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@
|
|
|
|
CFLAGS:=@CFLAGS@
|
|
override CXXFLAGS=@CXXFLAGS@
|
|
override CXXFLAGS+=-MMD -DHAVE_DECL_GETOPT=0 -D__OUTSIDE_CYGWIN__ -DSYSCONFDIR="\"$(sysconfdir)\""
|
|
|
|
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
|
|
LIBOBJS:=${patsubst %.o,lib%.o,$(OBJS)}
|
|
|
|
CYGWIN_OBJS:=$(cygwin_build)/version.o
|
|
|
|
CYGWIN_LIB:=$(cygwin_build)/libcygwin.a
|
|
|
|
all: cygserver.exe
|
|
|
|
install: all $(updir1)/mkinstalldirs cygserver.conf cygserver-config README
|
|
$(updir1)/mkinstalldirs $(DESTDIR)$(sbindir)
|
|
$(updir1)/mkinstalldirs $(DESTDIR)$(bindir)
|
|
$(updir1)/mkinstalldirs $(DESTDIR)$(sysconfdir)/defaults/etc
|
|
$(updir1)/mkinstalldirs $(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 -L$(cygwin_build) -lntdll
|
|
|
|
$(cygwin_build)/%.o: $(cygwin_source)/%.cc
|
|
@$(MAKE) -C $(@D) $(@F)
|
|
|
|
$(cygwin_build)/%.o: $(cygwin_source)/%.c
|
|
@$(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
|