OSDN Git Service

Accomodate moving cygserver header files from cygwin/include/cygwin
[pf3gnuchains/pf3gnuchains4x.git] / winsup / cygserver / Makefile.in
1 # Makefile for Cygwin server
2 # Copyright 2003 Red Hat, Inc.
3
4 # This file is part of Cygwin.
5
6 # This software is a copyrighted work licensed under the terms of the
7 # Cygwin license.  Please consult the file "CYGWIN_LICENSE" for
8 # details.
9
10 SHELL:=@SHELL@
11
12 srcdir:=@srcdir@
13 VPATH:=@srcdir@
14 prefix:=@prefix@
15 exec_prefix:=@exec_prefix@
16
17 bindir:=@bindir@
18 etcdir:=$(exec_prefix)/etc
19 program_transform_name:=@program_transform_name@
20
21 INSTALL:=@INSTALL@
22 INSTALL_PROGRAM:=@INSTALL_PROGRAM@
23 INSTALL_DATA:=@INSTALL_DATA@
24
25 CC:=@CC@
26 CC_FOR_TARGET:=$(CC)
27 CXX:=@CXX@
28 CXX_FOR_TARGET:=$(CXX)
29 AR:=@AR@
30
31 CFLAGS:=@CFLAGS@ -I$(cygwin_source)
32 CXXFLAGS:=@CXXFLAGS@ -I$(cygwin_source)
33 override CXXFLAGS+=-fno-exceptions -fno-rtti -DHAVE_DECL_GETOPT=0 -D__OUTSIDE_CYGWIN__
34
35 include $(srcdir)/../Makefile.common
36
37 OBJS:=  cygserver.o client.o process.o msg.o sem.o shm.o threaded_queue.o \
38         transport.o transport_pipes.o transport_sockets.o
39 LIBOBJS:=${patsubst %.o,lib%.o,$(OBJS)}
40
41 CYGWIN_OBJS:=$(cygwin_build)/smallprint.o $(cygwin_build)/version.o \
42         $(cygwin_build)/wincap.o
43
44 all: cygserver.exe
45
46 install: all
47
48 clean:
49         rm -f $(OBJS)
50
51 cygserver.exe: $(OBJS) $(CYGWIN_OBJS)
52         $(CXX) -o $@ $^
53
54 $(cygwin_build)/%.o: $(cygwin_source)/%.cc
55         @$(MAKE) -C $(@D) $(@F)
56
57 $(cygwin_build)/%.o: $(cygwin_source)/%.c
58         @$(MAKE) -C $(@D) $(@F)
59
60 Makefile: Makefile.in configure
61
62 lib%.o: %.cc
63         ${filter-out -D__OUTSIDE_CYGWIN__, $(COMPILE_CXX)} -I$(updir)/cygwin -o $(@D)/${basename $(@F)}$o $<
64
65 libcygserver.a: $(LIBOBJS)
66         $(AR) crus $@ $?