"Fossies" - the Fresh Open Source Software Archive

Member "meep-1.10.0/scheme/Makefile.am" (27 Feb 2019, 5338 Bytes) of package /linux/privat/meep-1.10.0.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the last Fossies "Diffs" side-by-side code changes report for "Makefile.am": 1.8.0_vs_1.9.0.

    1 bin_PROGRAMS = meep
    2 EXTRA_DIST = meep.scm.in meep-enums.scm casimir.scm materials.scm meep_wrap.patch examples
    3 
    4 LIBMEEP = $(top_builddir)/src/libmeep.la
    5 
    6 HDRS = meep-ctl.hpp meep-ctl-const.hpp meep-ctl-swig.hpp
    7 
    8 LIBHDRS = $(top_srcdir)/src/meep.hpp $(top_srcdir)/src/meep/vec.hpp $(top_srcdir)/src/meep/mympi.hpp
    9 CTLHDRS = $(LIBHDRS) $(srcdir)/meep-ctl.hpp $(top_builddir)/config.h $(srcdir)/meep-ctl-const.hpp ctl-io.h
   10 
   11 meep_SOURCES = meep.cpp structure.cpp meep_wrap.cxx $(HDRS) meep.i meep_op_renames.i meep_renames.i meep_enum_renames.i meep_swig_bug_workaround.i
   12 nodist_meep_SOURCES = main.cpp geom.cpp ctl-io.cpp ctl-io.h ctl-io.i
   13 meep_LDADD = $(LIBMEEP) @LIBCTL_LIBS@
   14 meep_CPPFLAGS = $(AM_CPPFLAGS) -Wno-unused-parameter -Wno-unused-variable -Wno-empty-body
   15 
   16 BUILT_SOURCES = $(nodist_meep_SOURCES) meep_renames.i meep_enum_renames.i meep_swig_bug_workaround.i meep-enums.scm meep_wrap.cxx
   17 
   18 # manual dependency hack to force the build order in certain cases
   19 # ... for some reason automake's automatic dependencies are not working here
   20 meep.o: meep.cpp meep-enums.scm $(CTLHDRS)
   21 structure.o: structure.cpp $(CTLHDRS)
   22 meep_wrap.o: meep_wrap.cxx $(srcdir)/meep-ctl-swig.hpp $(CTLHDRS)
   23 
   24 if WITH_LIBCTL
   25 if MAINTAINER_MODE
   26 SWIG ?= swig
   27 meep_wrap.cxx: meep.i meep_op_renames.i meep_enum_renames.i meep_renames.i ctl-io.i meep-ctl-swig.hpp meep_swig_bug_workaround.i $(LIBHDRS)
   28 	$(SWIG) -I$(top_srcdir)/src -c++ -guile -o $@ $(srcdir)/meep.i
   29 	patch -p0 $@ < $(srcdir)/meep_wrap.patch
   30 	sed -i.bak '/(SCM_SMOB_PREDICATE(swig_tag, smob) || SCM_SMOB_PREDICATE(swig_collectable_tag, smob))/ s/swig_collectable_tag, smob)/swig_collectable_tag, smob) || SCM_SMOB_PREDICATE((swig_collectable_tag \& ~0xff00), (smob))/' $@;
   31 else
   32 meep_wrap.cxx:
   33 	echo "#error need --with-maintainer-mode to generate this file" 1>&2
   34 	exit 1
   35 endif
   36 else
   37 meep_wrap.cxx:
   38 	echo "#error need --with-libctl to generate this file" > $@
   39 endif
   40 
   41 # workaround missing namespace prefix in swig
   42 meep_renames.i: $(LIBHDRS)
   43 	(echo "// AUTOMATICALLY GENERATED -- DO NOT EDIT"; perl -pe 's/^ *class +([A-Za-z_0-9:]*)( *| *:[^{]*){.*$$/%rename(meep_\1) meep::\1;/' $(LIBHDRS) | grep "%rename" | sort -u; echo; grep -hv typedef $(LIBHDRS) | perl -pe 's/(inline|const|extern|static) +//g' | perl -pe 's/^[A-Za-z_0-9:<>]+[* ]+([A-Za-z_0-9:]*) *\(.*$$/%rename(meep_\1) meep::\1;/' | grep "%rename" | sort -u; ) > $@
   44 
   45 # work around bug in swig, where it doesn't prepend namespace to friend funcs
   46 meep_swig_bug_workaround.i: $(LIBHDRS)
   47 	(echo "// AUTOMATICALLY GENERATED -- DO NOT EDIT"; grep -h friend $(LIBHDRS) | perl -pe 's/^ *friend +[A-Za-z_0-9:<>]+[* ]+([A-Za-z_0-9:]*) *\(.*$$/%ignore \1;/' | grep "%ignore" | sort -u;) > $@
   48 
   49 meep_enum_renames.i: $(LIBHDRS)
   50 	(echo "// AUTOMATICALLY GENERATED -- DO NOT EDIT"; for f in $(LIBHDRS); do egrep "^enum" $$f | perl -pe 's/enum +([A-Za-z_0-9:]+).*$$/\1/g' | while read enum; do cat $$f | tr -d '\n' | perl -pe 's/.*enum +'$${enum}' *{([^}]*)}.*/\1/g' | perl -pe 's/= *[0-9]+//g' |tr -d ' \t' | tr ',' '\n' | perl -pe 's/^(.*)$$/'"%rename(meep_$${enum}_\1) meep::\1;/g"; echo; done; done;) > $@
   51 
   52 meep-enums.scm: meep_enum_renames.i
   53 	(perl -pe 's/%rename\(([A-Za-z0-9_]*)\) *([A-Za-z0-9:_]*);$$/(define \2 (\1))/' meep_enum_renames.i | perl -pe 's/[A-Za-z0-9:_]*:://g' | perl -pe 's/_/-/g' | perl -pe 's,//,;,'; echo "(define Centered Dielectric)") > $@
   54 
   55 ##############################################################################
   56 #      stuff below is based on example Makefile.in included with libctl
   57 ##############################################################################
   58 
   59 # what is printed out when invoking your program with --version:
   60 VERSION_STRING = "Meep @VERSION@, Copyright (C) 2005-2019 Massachusetts Insitute of Technology."
   61 
   62 MY_DEFS = -DHAVE_CTL_HOOKS=1 -DHAVE_CTL_EXPORT_HOOK=1
   63 
   64 PROGRAM_NAME = meep
   65 SPECIFICATION_FILE = $(PROGRAM_NAME).scm
   66 nodist_pkgdata_DATA = $(SPECIFICATION_FILE) meep-enums.scm casimir.scm materials.scm
   67 
   68 ##############################################################################
   69 
   70 AM_CPPFLAGS = $(MY_DEFS) $(CTL_DEFS) $(CTL_H_CPPFLAG) @LIBCTL_CPPFLAGS@ -I$(top_srcdir)/src
   71 
   72 # libctl install. dir., e.g. /usr/local/share/libctl
   73 LIBCTL_DIR = @LIBCTL_DIR@
   74 
   75 # gen-ctl-io program
   76 GEN_CTL_IO = @GEN_CTL_IO@
   77 
   78 ##############################################################################
   79 
   80 CTL_DEFS = -DCTL_SCM='"'$(LIBCTL_DIR)/base/ctl.scm'"' \
   81        -DINCLUDE_SCM='"'$(LIBCTL_DIR)/base/include.scm'"' \
   82           -DSPEC_SCM='"'$(pkgdatadir)/$(SPECIFICATION_FILE)'"' \
   83     -DVERSION_STRING='"'$(VERSION_STRING)'"'
   84 
   85 ##############################################################################
   86 
   87 ctl-io.cpp: $(SPECIFICATION_FILE) $(LIBCTL_DIR)/utils/geom.scm ctl-io.h
   88 	$(GEN_CTL_IO) --cxx --code -o $@ $(SPECIFICATION_FILE) $(LIBCTL_DIR)
   89 
   90 ctl-io.h: $(SPECIFICATION_FILE) $(LIBCTL_DIR)/utils/geom.scm
   91 	$(GEN_CTL_IO) --cxx --header -o $@ $(SPECIFICATION_FILE) $(LIBCTL_DIR)
   92 
   93 ctl-io.i: $(SPECIFICATION_FILE) $(LIBCTL_DIR)/utils/geom.scm
   94 	$(GEN_CTL_IO) --cxx --swig -o $@ $(SPECIFICATION_FILE) $(LIBCTL_DIR)
   95 
   96 main.cpp: $(LIBCTL_DIR)/base/main.c ctl-io.h
   97 	cp -f $(LIBCTL_DIR)/base/main.c $@
   98 
   99 geom.cpp: $(LIBCTL_DIR)/utils/geom.c ctl-io.h
  100 	cp -f $(LIBCTL_DIR)/utils/geom.c $@
  101 
  102 clean-local:
  103 	rm -f $(nodist_meep_SOURCES) meep-enums.scm ctl-io.* main.* geom.*
  104 
  105 maintainer-clean-local:
  106 	rm -f $(BUILT_SOURCES)