2003-07-01 23:09:30 +02:00
|
|
|
# Makefile for Cygwin server
|
2009-01-03 06:37:34 +01:00
|
|
|
# Copyright 2003, 2006, 2007, 2008, 2009 Red Hat, Inc.
|
2003-07-01 23:09:30 +02:00
|
|
|
|
|
|
|
# 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.
|
|
|
|
|
|
|
|
SHELL:=@SHELL@
|
|
|
|
|
|
|
|
srcdir:=@srcdir@
|
|
|
|
VPATH:=@srcdir@
|
|
|
|
|
2008-10-30 14:17:42 +01:00
|
|
|
DESTDIR=
|
|
|
|
prefix:=${DESTDIR}@prefix@
|
|
|
|
exec_prefix:=${DESTDIR}@exec_prefix@
|
|
|
|
bindir:=${DESTDIR}@bindir@
|
|
|
|
sbindir:=${DESTDIR}@sbindir@
|
|
|
|
sysconfdir:=${DESTDIR}@sysconfdir@
|
2003-07-01 23:09:30 +02:00
|
|
|
program_transform_name:=@program_transform_name@
|
|
|
|
|
|
|
|
INSTALL:=@INSTALL@
|
|
|
|
INSTALL_PROGRAM:=@INSTALL_PROGRAM@
|
|
|
|
INSTALL_DATA:=@INSTALL_DATA@
|
|
|
|
|
|
|
|
CC:=@CC@
|
|
|
|
CC_FOR_TARGET:=$(CC)
|
|
|
|
CXX:=@CXX@
|
|
|
|
CXX_FOR_TARGET:=$(CXX)
|
2003-08-25 20:22:07 +02:00
|
|
|
AR:=@AR@
|
2003-07-01 23:09:30 +02:00
|
|
|
|
2003-11-19 19:49:41 +01:00
|
|
|
include $(srcdir)/../Makefile.common
|
|
|
|
|
2003-12-26 06:37:54 +01:00
|
|
|
CFLAGS:=@CFLAGS@
|
2009-08-18 10:37:23 +02:00
|
|
|
override CXXFLAGS=@CXXFLAGS@
|
2003-11-26 04:52:12 +01:00
|
|
|
override CXXFLAGS+=-MMD -DHAVE_DECL_GETOPT=0 -D__OUTSIDE_CYGWIN__ -DSYSCONFDIR="\"$(sysconfdir)\""
|
2003-07-01 23:09:30 +02:00
|
|
|
|
2003-11-19 19:49:41 +01:00
|
|
|
.SUFFIXES: .c .cc .a .o .d
|
2003-07-01 23:09:30 +02:00
|
|
|
|
2003-08-30 18:34:56 +02:00
|
|
|
OBJS:= cygserver.o client.o process.o msg.o sem.o shm.o threaded_queue.o \
|
2007-08-02 16:23:22 +02:00
|
|
|
transport.o transport_pipes.o \
|
2003-11-19 19:49:41 +01:00
|
|
|
bsd_helper.o bsd_log.o bsd_mutex.o \
|
2008-11-26 11:18:53 +01:00
|
|
|
sysv_msg.o sysv_sem.o sysv_shm.o setpwd.o
|
2003-08-25 20:22:07 +02:00
|
|
|
LIBOBJS:=${patsubst %.o,lib%.o,$(OBJS)}
|
2003-07-01 23:09:30 +02:00
|
|
|
|
2008-02-06 23:01:30 +01:00
|
|
|
CYGWIN_OBJS:=$(cygwin_build)/version.o
|
2003-07-01 23:09:30 +02:00
|
|
|
|
2003-11-26 21:05:09 +01:00
|
|
|
CYGWIN_LIB:=$(cygwin_build)/libcygwin.a
|
|
|
|
|
2003-10-22 12:04:11 +02:00
|
|
|
all: cygserver.exe
|
2003-07-01 23:09:30 +02:00
|
|
|
|
2003-11-21 19:10:49 +01:00
|
|
|
install: all $(updir1)/mkinstalldirs cygserver.conf cygserver-config README
|
2009-02-24 03:11:14 +01:00
|
|
|
$(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
|
2003-07-01 23:09:30 +02:00
|
|
|
|
2003-07-02 04:31:32 +02:00
|
|
|
clean:
|
2003-11-19 19:49:41 +01: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 04:31:32 +02:00
|
|
|
|
2008-02-06 23:01:30 +01:00
|
|
|
cygserver.exe: $(CYGWIN_LIB) $(OBJS) $(CYGWIN_OBJS)
|
2008-10-30 14:17:42 +01:00
|
|
|
$(CXX) -o $@ ${wordlist 2,999,$^} -static-libgcc -L$(cygwin_build) -lntdll
|
2003-07-02 04:31:32 +02:00
|
|
|
|
|
|
|
$(cygwin_build)/%.o: $(cygwin_source)/%.cc
|
|
|
|
@$(MAKE) -C $(@D) $(@F)
|
|
|
|
|
|
|
|
$(cygwin_build)/%.o: $(cygwin_source)/%.c
|
|
|
|
@$(MAKE) -C $(@D) $(@F)
|
|
|
|
|
|
|
|
Makefile: Makefile.in configure
|
2003-08-25 20:22:07 +02:00
|
|
|
|
|
|
|
lib%.o: %.cc
|
2009-01-03 06:37:34 +01:00
|
|
|
${filter-out -D__OUTSIDE_CYGWIN__, $(COMPILE_CXX)} -c -I$(updir)/cygwin -I$(bupdir)/cygwin -o $(@D)/${basename $(@F)}$o $<
|
2003-08-25 20:22:07 +02:00
|
|
|
|
|
|
|
libcygserver.a: $(LIBOBJS)
|
|
|
|
$(AR) crus $@ $?
|
2003-11-19 19:49:41 +01:00
|
|
|
|
|
|
|
deps:=${wildcard *.d}
|
|
|
|
ifneq (,$(deps))
|
|
|
|
include $(deps)
|
|
|
|
endif
|