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
|
### Makefile.am
AM_CPPFLAGS = -D_POSIX_C_SOURCE=200112L -D_XOPEN_SOURCE=600 -D_BSD_SOURCE
AM_LDFLAGS =
EXTRA_DIST =
MEX_LDFLAGS = -module -shared -avoid-version -shrext ".mex"
mex_LTLIBRARIES =
mex_DATA =
EXTRA_DIST += $(mex_DATA)
if BUILD_MEXCLI
mexdir = $(MATLABPATH)/dateutils
octlab_CFLAGS = -DMATLAB_MEX_FILE $(matlab_CFLAGS)
else !BUILD_MEXCLI
## backup plan is to use octave to build the mex file
if BUILD_OCTCLI
mexdir = $(OCTAVEPATH)/dateutils
octlab_CFLAGS = -DOCTAVE_MEX_FILE $(octave_CFLAGS)
else !BUILD_OCTCLI
## no idea what we're doing here
mexdir = $(pkglibexecdir)
endif !BUILD_OCTCLI
endif !BUILD_MEXCLI
mex_LTLIBRARIES += tzconv.la
mex_DATA += tzconv.m
tzconv_la_LDFLAGS = $(AM_LDFLAGS)
tzconv_la_LDFLAGS += $(MEX_LDFLAGS)
tzconv_la_LDFLAGS += $(XCCLDFLAGS)
tzconv_la_CPPFLAGS = $(AM_CPPFLAGS)
tzconv_la_CPPFLAGS += $(octlab_CFLAGS)
tzconv_la_CPPFLAGS += -I$(top_srcdir)/lib
tzconv_la_CPPFLAGS += -I$(top_builddir)/lib
tzconv_la_CPPFLAGS += -DDECLF=extern -DDEFUN=
tzconv_la_SOURCES = tzconv.c
tzconv_la_SOURCES += tzraw.c tzraw.h
tzconv_la_SOURCES += leaps.c leaps.h
## get around subdir-object bug in conjunction with distclean in automake 1.14+
tzraw.c tzraw.h:
$(LN_S) $(top_srcdir)/lib/$@ $@
leaps.c leaps.h:
$(LN_S) $(top_srcdir)/lib/$@ $@
install-data-hook:
-cd $(DESTDIR)$(mexdir) && mv -f tzconv.mex tzconv.$(MEXEXT)
uninstall-hook:
-$(RM) -- $(DESTDIR)$(mexdir)/tzconv.$(MEXEXT)
#
# Help the developers get nice post-processed source files
## Create preprocessor output (debugging purposes only)
.c.i:
$(COMPILE) -E -o $@ $<
## Create assembler output (debugging purposes only)
.c.s:
$(COMPILE) -S -c $(AM_CFLAGS) $<
|