summaryrefslogtreecommitdiffstats
path: root/clientcomm/Makefile-files
blob: 67f29615f7a101608e60a258255cfa84970fce52 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# -*-Makefile-*- (for Emacs)
#
# This file is part of rasdaman community.
#
# Rasdaman community 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 3 of the License, or
# (at your option) any later version.
#
# Rasdaman community 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 rasdaman community.  If not, see <http://www.gnu.org/licenses/>.
#
# Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009 Peter Baumann /
# rasdaman GmbH.
#
# For more information please see <http://www.rasdaman.org>
# or contact Peter Baumann via <baumann@rasdaman.com>.
# 
# MAKEFILE FOR:  
#   module clientcomm
# 
# COMMENTS: 
# - build of akgnet should be revisited wrt. 3rdParty!
#
##################################################################

pkglib_LTLIBRARIES += libclientcomm.la

nodist_libclientcomm_la_SOURCES  = clientcomm/rpcif_clnt.cc
nodist_libclientcomm_la_SOURCES += clientcomm/rpcif_xdr.c
nodist_libclientcomm_la_SOURCES += clientcomm/rpcif.h
libclientcomm_la_SOURCES = clientcomm.cc clientcomm.hh rpcclientcomm.cc \
                          rpcclientcomm.hh clientcomm.icc \
                          ../mymalloc/mymalloc_cln.cc ../mymalloc/mymalloc.h \
                          ../rnprotocol/rnprotocol.cc \
                          ../rnprotocol/rnprotocol.hh \
                          ../rnprotocol/rnpembedded.cc \
                          ../rnprotocol/rnpembedded.hh \
                          ../rnprotocol/rnpcommunication.cc \
                          ../rnprotocol/rnpcommunication.hh \
                          ../rnprotocol/rnprasserver.cc \
                          ../rnprotocol/rnpclientcomm.cc \
                          ../rnprotocol/rnpclientcomm2.cc \
                          ../rnprotocol/rnpclientcomm.hh
libclientcomm_la_CPPFLAGS  = $(AM_CPPFLAGS)
libclientcomm_la_CPPFLAGS += -I$(top_srcdir)/rnprotocol
libclientcomm_la_CPPFLAGS += $(CLIENT_CPPFLAGS)

EXTRA_libclientcomm_la_SOURCES = clientcomm/rpcif.x

BUILT_SOURCES += clientcomm/rpcif.h
CLEANFILES += clientcomm/rpcif.h clientcomm/rpcif.h.tmp clientcomm/rpcif.h.tmp2
EXTRA_DIST += clientcomm/rpcif.h.awk
clientcomm/rpcif.h: clientcomm/rpcif.x clientcomm/rpcif.h.awk Makefile
	$(MKDIR_P) clientcomm
	$(RPCGEN) -h -o clientcomm/rpcif.h.tmp $(srcdir)/clientcomm/rpcif.x
	$(AWK) -f $(srcdir)/clientcomm/rpcif.h.awk clientcomm/rpcif.h.tmp > clientcomm/rpcif.h.tmp2
	$(SED) 's,_RPCIF\.H_H_RPCGEN,_RPCIF_H_H_RPCGEN,g' clientcomm/rpcif.h.tmp2 > clientcomm/rpcif.h
	rm clientcomm/rpcif.h.tmp clientcomm/rpcif.h.tmp2

FIX_RPCIF_H_INCLUDE  = $(SED)
FIX_RPCIF_H_INCLUDE += 's,^\#include ".*/clientcomm/rpcif.h"$$,\#include "clientcomm/rpcif.h",'

BUILT_SOURCES += clientcomm/rpcif_clnt.cc
CLEANFILES += clientcomm/rpcif_clnt.cc clientcomm/rpcif_clnt.c.tmp clientcomm/rpcif_clnt.c.tmp2
EXTRA_DIST += clientcomm/rpcif_clnt.c.awk
clientcomm/rpcif_clnt.cc: clientcomm/rpcif.x clientcomm/rpcif_clnt.c.awk Makefile
	rm -f clientcomm/rpcif_clnt.cc.tmp
	$(MKDIR_P) clientcomm
	$(RPCGEN) -l -o clientcomm/rpcif_clnt.cc.tmp $(srcdir)/clientcomm/rpcif.x
	$(AWK) -f $(srcdir)/clientcomm/rpcif_clnt.c.awk clientcomm/rpcif_clnt.cc.tmp > clientcomm/rpcif_clnt.cc.tmp2
	$(FIX_RPCIF_H_INCLUDE) clientcomm/rpcif_clnt.cc.tmp2 > clientcomm/rpcif_clnt.cc
	rm clientcomm/rpcif_clnt.cc.tmp clientcomm/rpcif_clnt.cc.tmp2

BUILT_SOURCES += clientcomm/rpcif_xdr.c
CLEANFILES += clientcomm/rpcif_xdr.c clientcomm/rpcif_xdr.c.tmp
clientcomm/rpcif_xdr.c: clientcomm/rpcif.x Makefile
	rm -f clientcomm/rpcif_xdr.c.tmp
	$(MKDIR_P) clientcomm
	$(RPCGEN) -c -o clientcomm/rpcif_xdr.c.tmp $(srcdir)/clientcomm/rpcif.x
	$(FIX_RPCIF_H_INCLUDE) clientcomm/rpcif_xdr.c.tmp > clientcomm/rpcif_xdr.c
	rm clientcomm/rpcif_xdr.c.tmp

BUILT_SOURCES += clientcomm/rpcif_svc.cc
CLEANFILES += clientcomm/rpcif_svc.cc clientcomm/rpcif_svc.cc.tmp clientcomm/rpcif_svc.cc.tmp2
EXTRA_DIST += clientcomm/rpcif_svc.c.awk
clientcomm/rpcif_svc.cc: clientcomm/rpcif.x clientcomm/rpcif_svc.c.awk Makefile
	rm -f clientcomm/rpcif_svc.cc.tmp
	$(MKDIR_P) clientcomm
	$(RPCGEN) -m -o clientcomm/rpcif_svc.cc.tmp $(srcdir)/clientcomm/rpcif.x
	$(AWK) -f $(srcdir)/clientcomm/rpcif_svc.c.awk clientcomm/rpcif_svc.cc.tmp > clientcomm/rpcif_svc.cc.tmp2
	$(FIX_RPCIF_H_INCLUDE) clientcomm/rpcif_svc.cc.tmp2 > clientcomm/rpcif_svc.cc
	rm clientcomm/rpcif_svc.cc.tmp clientcomm/rpcif_svc.cc.tmp2