Welcome to mirror list, hosted at ThFree Co, Russian Federation.

Makefile.in « cygserver « winsup - cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: e98dea2e6551013f062c3a9b28b1657f63a463f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# 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@

CFLAGS:=@CFLAGS@
override CXXFLAGS=@CXXFLAGS@
override CXXFLAGS+=-MMD -D__OUTSIDE_CYGWIN__ -DSYSCONFDIR="\"$(sysconfdir)\""

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@


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 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 -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