2003-07-02 05:09:30 +08:00
|
|
|
# Makefile for Cygwin server
|
2006-01-13 00:59:15 +08:00
|
|
|
# Copyright 2003, 2006 Red Hat, Inc.
|
2003-07-02 05:09:30 +08: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@
|
|
|
|
prefix:=@prefix@
|
|
|
|
exec_prefix:=@exec_prefix@
|
|
|
|
|
|
|
|
bindir:=@bindir@
|
2003-11-20 02:49:41 +08:00
|
|
|
sbindir:=@sbindir@
|
|
|
|
sysconfdir:=@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@
|
|
|
|
|
|
|
|
CC:=@CC@
|
|
|
|
CC_FOR_TARGET:=$(CC)
|
|
|
|
CXX:=@CXX@
|
|
|
|
CXX_FOR_TARGET:=$(CXX)
|
2003-08-26 02:22:07 +08:00
|
|
|
AR:=@AR@
|
2003-07-02 05:09:30 +08:00
|
|
|
|
2003-11-20 02:49:41 +08:00
|
|
|
include $(srcdir)/../Makefile.common
|
|
|
|
|
2003-12-26 13:37:54 +08:00
|
|
|
CFLAGS:=@CFLAGS@
|
|
|
|
CXXFLAGS:=@CXXFLAGS@
|
2003-11-26 11:52:12 +08:00
|
|
|
override CXXFLAGS+=-MMD -DHAVE_DECL_GETOPT=0 -D__OUTSIDE_CYGWIN__ -DSYSCONFDIR="\"$(sysconfdir)\""
|
2003-07-02 05:09:30 +08:00
|
|
|
|
2003-11-20 02:49:41 +08:00
|
|
|
.SUFFIXES: .c .cc .a .o .d
|
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 \
|
2003-11-20 02:49:41 +08:00
|
|
|
transport.o transport_pipes.o transport_sockets.o \
|
|
|
|
bsd_helper.o bsd_log.o bsd_mutex.o \
|
2006-01-13 00:59:15 +08:00
|
|
|
sysv_msg.o sysv_sem.o sysv_shm.o wincap.o
|
2003-08-26 02:22:07 +08:00
|
|
|
LIBOBJS:=${patsubst %.o,lib%.o,$(OBJS)}
|
2003-07-02 05:09:30 +08:00
|
|
|
|
2006-01-13 00:59:15 +08:00
|
|
|
CYGWIN_OBJS:=$(cygwin_build)/smallprint.o $(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
|
|
|
|
2003-11-22 02:10:49 +08:00
|
|
|
install: all $(updir1)/mkinstalldirs cygserver.conf cygserver-config README
|
|
|
|
$(updir1)/mkinstalldirs $(sbindir)
|
|
|
|
$(updir1)/mkinstalldirs $(bindir)
|
|
|
|
$(updir1)/mkinstalldirs $(sysconfdir)/defaults/etc
|
|
|
|
$(updir1)/mkinstalldirs $(prefix)/share/doc/Cygwin
|
2003-11-20 02:49:41 +08:00
|
|
|
$(INSTALL_PROGRAM) cygserver.exe $(sbindir)/cygserver.exe
|
2003-11-22 02:10:49 +08:00
|
|
|
$(INSTALL_PROGRAM) $(srcdir)/cygserver-config $(bindir)/cygserver-config
|
2003-11-20 21:51:34 +08:00
|
|
|
$(INSTALL_DATA) $(srcdir)/cygserver.conf $(sysconfdir)/defaults/etc/cygserver.conf
|
2003-11-22 02:10:49 +08:00
|
|
|
$(INSTALL_DATA) $(srcdir)/README $(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
|
|
|
|
2003-12-26 13:37:54 +08:00
|
|
|
cygserver.exe: $(CYGWIN_LIB) $(OBJS) $(CYGWIN_OBJS)
|
|
|
|
$(CXX) -o $@ ${wordlist 2,999,$^} -L$(cygwin_build)
|
2003-07-02 10:31:32 +08: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-26 02:22:07 +08:00
|
|
|
|
|
|
|
lib%.o: %.cc
|
|
|
|
${filter-out -D__OUTSIDE_CYGWIN__, $(COMPILE_CXX)} -I$(updir)/cygwin -o $(@D)/${basename $(@F)}$o $<
|
|
|
|
|
|
|
|
libcygserver.a: $(LIBOBJS)
|
|
|
|
$(AR) crus $@ $?
|
2003-11-20 02:49:41 +08:00
|
|
|
|
|
|
|
deps:=${wildcard *.d}
|
|
|
|
ifneq (,$(deps))
|
|
|
|
include $(deps)
|
|
|
|
endif
|