2003-07-01 23:09:30 +02:00
|
|
|
# Makefile for Cygwin server
|
|
|
|
# Copyright 2003 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.
|
|
|
|
|
|
|
|
SHELL:=@SHELL@
|
|
|
|
|
|
|
|
srcdir:=@srcdir@
|
|
|
|
VPATH:=@srcdir@
|
|
|
|
prefix:=@prefix@
|
|
|
|
exec_prefix:=@exec_prefix@
|
|
|
|
|
|
|
|
bindir:=@bindir@
|
2003-11-19 19:49:41 +01:00
|
|
|
sbindir:=@sbindir@
|
|
|
|
sysconfdir:=@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-07-01 23:09:30 +02:00
|
|
|
CFLAGS:=@CFLAGS@ -I$(cygwin_source)
|
|
|
|
CXXFLAGS:=@CXXFLAGS@ -I$(cygwin_source)
|
2003-11-19 19:49:41 +01:00
|
|
|
override CXXFLAGS+=-MMD -fno-exceptions -fno-rtti -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 \
|
2003-11-19 19:49:41 +01:00
|
|
|
transport.o transport_pipes.o transport_sockets.o \
|
|
|
|
bsd_helper.o bsd_log.o bsd_mutex.o \
|
|
|
|
sysv_msg.o sysv_sem.o sysv_shm.o
|
2003-08-25 20:22:07 +02:00
|
|
|
LIBOBJS:=${patsubst %.o,lib%.o,$(OBJS)}
|
2003-07-01 23:09:30 +02:00
|
|
|
|
|
|
|
CYGWIN_OBJS:=$(cygwin_build)/smallprint.o $(cygwin_build)/version.o \
|
|
|
|
$(cygwin_build)/wincap.o
|
|
|
|
|
2003-10-22 12:04:11 +02:00
|
|
|
all: cygserver.exe
|
2003-07-01 23:09:30 +02:00
|
|
|
|
2003-11-19 19:49:41 +01:00
|
|
|
install: all cygserver.conf
|
|
|
|
$(INSTALL_PROGRAM) cygserver.exe $(sbindir)/cygserver.exe
|
|
|
|
$(INSTALL_DATA) $(srcdir)/cygserver.conf $(sysconfdir)/cygserver.conf
|
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
|
|
|
|
2003-07-01 23:09:30 +02:00
|
|
|
cygserver.exe: $(OBJS) $(CYGWIN_OBJS)
|
2003-07-02 04:31:32 +02:00
|
|
|
$(CXX) -o $@ $^
|
|
|
|
|
|
|
|
$(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
|
|
|
|
${filter-out -D__OUTSIDE_CYGWIN__, $(COMPILE_CXX)} -I$(updir)/cygwin -o $(@D)/${basename $(@F)}$o $<
|
|
|
|
|
|
|
|
libcygserver.a: $(LIBOBJS)
|
|
|
|
$(AR) crus $@ $?
|
2003-11-19 19:49:41 +01:00
|
|
|
|
|
|
|
deps:=${wildcard *.d}
|
|
|
|
ifneq (,$(deps))
|
|
|
|
include $(deps)
|
|
|
|
endif
|