2016-01-30 05:24:23 +00:00
|
|
|
AUTOMAKE_OPTIONS = nostdinc
|
|
|
|
|
|
|
|
CPPFLAGS_ALL_COMMON = \
|
|
|
|
-I$(abs_builddir) \
|
|
|
|
-I$(abs_srcdir) \
|
|
|
|
-I$(includedir)
|
|
|
|
|
|
|
|
LDFLAGS_ALL_COMMON = -L$(abs_builddir) -L$(libdir)
|
|
|
|
|
|
|
|
##################################################
|
|
|
|
# MAIN LIBRARY
|
|
|
|
##################################################
|
|
|
|
|
|
|
|
CPPFLAGS_LIB_COMMON = $(CPPFLAGS_ALL_COMMON) $(LTDLINCL)
|
|
|
|
LDFLAGS_LIB_COMMON = $(LDFLAGS_ALL_COMMON) -version-info 1:0:0 -no-undefined
|
|
|
|
LIBADD_LIB_COMMON = $(LIBM) $(LIBLTDL)
|
|
|
|
|
|
|
|
pkgincludedir = $(includedir)
|
|
|
|
pkglibdir = $(libdir)
|
|
|
|
pkgbindir = $(bindir)
|
|
|
|
|
|
|
|
pkginclude_HEADERS = \
|
|
|
|
stio-cfg.h \
|
|
|
|
stio-cmn.h \
|
2016-02-02 15:40:09 +00:00
|
|
|
stio-pro.h \
|
|
|
|
stio-sck.h \
|
2016-01-30 05:24:23 +00:00
|
|
|
stio-tcp.h \
|
|
|
|
stio-udp.h \
|
2016-03-23 13:54:15 +00:00
|
|
|
stio-arp.h \
|
2016-01-30 05:24:23 +00:00
|
|
|
stio.h
|
|
|
|
|
|
|
|
pkglib_LTLIBRARIES = libstio.la
|
|
|
|
libstio_la_SOURCES = \
|
|
|
|
stio-prv.h \
|
|
|
|
stio.c \
|
2016-02-02 15:40:09 +00:00
|
|
|
stio-pro.c \
|
2016-01-30 05:24:23 +00:00
|
|
|
stio-sck.c \
|
|
|
|
stio-tcp.c \
|
|
|
|
stio-tim.c \
|
|
|
|
stio-tmr.c \
|
2016-03-23 13:54:15 +00:00
|
|
|
stio-udp.c \
|
|
|
|
stio-arp.c
|
2016-01-30 05:24:23 +00:00
|
|
|
libstio_la_CPPFLAGS = $(CPPFLAGS_LIB_COMMON)
|
|
|
|
libstio_la_LDFLAGS = $(LDFLAGS_LIB_COMMON)
|
|
|
|
libstio_la_LIBADD = $(LIBADD_LIB_COMMON)
|
|
|
|
|
|
|
|
pkgbin_PROGRAMS = stio
|
|
|
|
stio_SOURCES = main.c
|
|
|
|
stio_CPPFLAGS = $(CPPFLAGS_LIB_COMMON)
|
|
|
|
stio_LDFLAGS = $(LDFLAGS_LIB_COMMON)
|
|
|
|
stio_LDADD = $(LIBADD_LIB_COMMON) -lstio
|
|
|
|
|
|
|
|
install-data-hook:
|
|
|
|
@echo "#ifndef _STIO_CFG_H_" > "$(DESTDIR)$(pkgincludedir)/stio-cfg.h"
|
|
|
|
@echo "#define _STIO_CFG_H_" >> "$(DESTDIR)$(pkgincludedir)/stio-cfg.h"
|
|
|
|
@$(EGREP) "#define[ ]+STIO_" "$(abs_builddir)/stio-cfg.h" >> "$(DESTDIR)$(pkgincludedir)/stio-cfg.h"
|
|
|
|
@echo "#endif" >> "$(DESTDIR)$(pkgincludedir)/stio-cfg.h"
|
|
|
|
@$(RM) "$(DESTDIR)$(pkgincludedir)/stio-cfg.h.in"
|
|
|
|
@$(SED) 's|/\*#define STIO_HAVE_CFG_H\*/|#define STIO_HAVE_CFG_H|' "$(srcdir)/stio-cmn.h" > "$(DESTDIR)$(pkgincludedir)/stio-cmn.h"
|
|
|
|
|
|
|
|
uninstall-hook:
|
|
|
|
@$(RM) "$(DESTDIR)$(pkgincludedir)/stio-cfg.h"
|
|
|
|
|