2006-09-01 01:05:25 +02:00
|
|
|
#######################################################################
|
|
|
|
#
|
|
|
|
# Copyright (C) 2006 Novell, Inc.
|
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of the GNU General Public
|
|
|
|
# License as published by the Free Software Foundation; either
|
|
|
|
# version 2 of the License, or (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
# General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public
|
|
|
|
# License along with this program; if not, write to the Free
|
|
|
|
# Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
|
#
|
|
|
|
# Author: Juan Carlos Luciani <jluciani@novell.com>
|
|
|
|
#
|
|
|
|
#######################################################################
|
|
|
|
|
|
|
|
if DEBUG
|
|
|
|
TARGET_CFG = Debug
|
|
|
|
CFLAGS += -v -w
|
|
|
|
DEFINES = -DDBG
|
|
|
|
else
|
|
|
|
TARGET_CFG = Release
|
|
|
|
DEFINES = -DNDEBUG
|
|
|
|
endif
|
|
|
|
|
|
|
|
# Override the link setting for C++
|
|
|
|
LINK = g++
|
|
|
|
|
|
|
|
SUBDIRS =
|
|
|
|
|
|
|
|
DIST_SUBDIRS =
|
|
|
|
|
|
|
|
ROOT = ../../../..
|
|
|
|
|
|
|
|
LIBDIR = $(ROOT)/$(LIB)
|
|
|
|
|
|
|
|
# handle Mono secondary dependencies
|
|
|
|
export MONO_PATH := $(MONO_PATH)
|
|
|
|
|
|
|
|
COMMON = ../common
|
|
|
|
SERVER = .
|
|
|
|
|
|
|
|
MODULE_NAME = libcasa_s_ipc
|
|
|
|
MODULE_EXT = so
|
|
|
|
|
|
|
|
CFILES =
|
|
|
|
|
2006-09-08 23:53:13 +02:00
|
|
|
CPPFILES = schannel.cpp \
|
2006-09-01 01:05:25 +02:00
|
|
|
serverreq.cpp \
|
|
|
|
serverthread.cpp \
|
|
|
|
server.cpp
|
|
|
|
|
2006-09-08 23:53:13 +02:00
|
|
|
COMMONCPPFILES = channelproto.cpp
|
|
|
|
|
2006-09-01 01:05:25 +02:00
|
|
|
CSFILES_CSC :=
|
|
|
|
INCLUDES = -I. -I.. -I../common -I../../../../include
|
|
|
|
RESOURCES =
|
2006-10-05 23:25:00 +02:00
|
|
|
|
|
|
|
if LIB64
|
|
|
|
DEFINES += -D_LIB64
|
|
|
|
endif
|
|
|
|
|
|
|
|
CFLAGS += -Wno-format-extra-args -fno-strict-aliasing -fshort-wchar $(INCLUDES) $(DEFINES)
|
|
|
|
CPPFLAGS += -Wno-format-extra-args -fno-strict-aliasing -fshort-wchar -fPIC $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS)
|
2006-09-06 00:52:21 +02:00
|
|
|
LIBS = -lpthread
|
2006-09-01 01:05:25 +02:00
|
|
|
LDFLAGS = -Bsymbolic -shared -Wl,-soname=$(MODULE_NAME).$(MODULE_EXT)
|
|
|
|
|
|
|
|
OBJDIR = ./$(TARGET_CFG)/$(LIB)
|
2006-09-08 23:53:13 +02:00
|
|
|
OBJS = $(addprefix $(OBJDIR)/, $(CFILES:%.c=%.o)) $(addprefix $(OBJDIR)/, $(COMMONCPPFILES:%.cpp=%.o)) $(addprefix $(OBJDIR)/, $(CPPFILES:%.cpp=%.o))
|
2006-09-01 01:05:25 +02:00
|
|
|
|
2006-09-08 23:53:13 +02:00
|
|
|
EXTRA_DIST = $(CFILES) $(CPPFILES) *.h
|
2006-09-01 01:05:25 +02:00
|
|
|
|
|
|
|
CUR_DIR := $(shell pwd)
|
|
|
|
|
|
|
|
all: $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT)
|
|
|
|
|
|
|
|
#
|
|
|
|
# Pattern based rules.
|
|
|
|
#
|
|
|
|
vpath %.c $(SERVER) $(COMMON)
|
|
|
|
vpath %.cpp $(SERVER) $(COMMON)
|
|
|
|
|
|
|
|
$(OBJDIR)/%.o: %.c
|
|
|
|
$(CC) -c $(CFLAGS) -o $@ $<
|
|
|
|
|
|
|
|
$(OBJDIR)/%.o: %.cpp
|
|
|
|
$(CC) -c $(CPPFLAGS) -o $@ $<
|
|
|
|
|
|
|
|
$(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT): $(OBJDIR) $(OBJS)
|
|
|
|
@echo [======== Linking $@ ========]
|
|
|
|
$(LINK) -o $@ $(LDFLAGS) $(OBJS) $(LIBS)
|
|
|
|
cp -f $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT) $(LIBDIR)/$(TARGET_CFG)/$(MODULE_NAME).$(MODULE_EXT)
|
|
|
|
|
|
|
|
$(OBJDIR):
|
|
|
|
[ -d $(OBJDIR) ] || mkdir -p $(OBJDIR)
|
|
|
|
[ -d $(LIBDIR) ] || mkdir -p $(LIBDIR)
|
|
|
|
[ -d $(LIBDIR)/$(TARGET_CFG) ] || mkdir -p $(LIBDIR)/$(TARGET_CFG)
|
|
|
|
|
|
|
|
|
|
|
|
install-exec-local: $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT)
|
|
|
|
$(mkinstalldirs) $(DESTDIR)$(libdir)
|
|
|
|
$(INSTALL_PROGRAM) $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT) $(DESTDIR)$(libdir)/
|
|
|
|
|
|
|
|
uninstall-local:
|
|
|
|
cd $(DESTDIR)$(libdir); rm -f $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT)
|
|
|
|
rmdir $(DESTDIR)$(libdir)
|
|
|
|
|
|
|
|
#installcheck-local: install
|
|
|
|
# $(mkinstalldirs) $(DESTDIR)$(libdir)
|
|
|
|
# $(INSTALL_PROGRAM) $(DESTDIR)$(libdir)
|
|
|
|
# cd $(DESTDIR)$(libdir); $(MONO)
|
|
|
|
|
|
|
|
clean-local:
|
|
|
|
if [ -d $(TARGET_CFG) ]; then rm -rf $(TARGET_CFG); fi
|
|
|
|
|
|
|
|
distclean-local:
|
|
|
|
|
|
|
|
maintainer-clean-local:
|
|
|
|
rm -f Makefile.in
|
|
|
|
|