1
0
mirror of https://github.com/haiwen/libsearpc.git synced 2025-08-30 10:28:10 +00:00
libsearpc/lib/Makefile.am

58 lines
1.9 KiB
Makefile

# Five files are generated by a python script:
# Used in client:
#
# * fcall-impr.h: contains the implementation of functions like
# `searpc_client_fcall__string_string`. These function is used by the
# client to pack the RPC call to json data.
# * searpc-fcall.h: constains the declaration of the functions in fcall-impr.h
# * searpc-dfun.h: contains macros like `SEARPC_CLIENT_DEFUN_INT__STRING(funcname)`.
#
# Used in server:
#
# * searpc-signature.h: contains functions like `searpc_signature_int__string()`.
# * searpc-marshal.h: contains functions like `marshal_int__string()`
#
generated_sources = fcall-impr.h searpc-fcall.h searpc-dfun.h \
searpc-signature.h marshal.h
# rpc_headers = fcall-impr.h searpc-fcall.h searpc-dfun.h searpc-signature.h searpc-marshal.h
AM_CFLAGS = @GLIB2_CFLAGS@ @GOBJECT_CFLAGS@ @JSON_GLIB_CFLAGS@ \
-I${top_builddir}/lib \
-I${top_srcdir}/lib \
-DG_LOG_DOMAIN=\"Searpc\"
# we need to generate the first
BUILT_SOURCES = gensource
lib_LTLIBRARIES = libsearpc.la
include_HEADERS = searpc-fcall.h searpc-client.h searpc-dfun.h \
searpc-server.h searpc-signature.h searpc-utils.h
noinst_HEADERS = searpc-utils.h fcall-impr.h marshal.h
libsearpc_la_SOURCES = searpc-client.c searpc-server.c $(generated_sources)
libsearpc_la_LDFLAGS = -version-info 1:1:0 -no-undefined
libsearpc_la_LIBADD = @GLIB2_LIBS@ @GOBJECT_LIBS@ @JSON_GLIB_LIBS@
genrpc_files = gencode.py rpc_table.py
EXTRA_DIST = ${genrpc_files}
gensource: ${generated_sources}
${generated_sources}: gencode.py rpc_table.py
@echo "[libsearpc]: generating rpc header files"
python gencode.py gen-fcall > fcall-impr.h
python gencode.py gen-fcall-declare > searpc-fcall.h
python gencode.py gen-dfun-macro > searpc-dfun.h
python gencode.py gen-signature > searpc-signature.h
python gencode.py gen-marshal > marshal.h
@echo "[libsearpc]: done"
DISTCLEANFILES = ${generated_sources}