[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: autotools selects m2c to compile mod files
From: |
Martin Kalbfuß |
Subject: |
Re: autotools selects m2c to compile mod files |
Date: |
Tue, 22 Sep 2009 12:35:09 +0200 |
asking google for "gnu-make m2c" gave me the needed answers. Now my
files look like:
src/Makefile.am #######################################################
moddir=/home/martin/opt/lib/gcc/i686-pc-linux-gnu/4.1.2/gm2
noinst_LIBRARIES = libVectorMath.a
libVectorMath_a_SOURCES = VectorMath.mod
libVectorMath_a_SOURCES += SVectorIO.mod
EXTRA_libVectorMath_a_SOURCES = force_c_compiler_defaults.c
mod_HEADERS = VectorMath.def
mod_HEADERS += SVectorIO.def
mod_DATA = VectorMath.o
mod_DATA += SVectorIO.o
mod_DATA += VectorMath.mod
mod_DATA += SVectorIO.mod
autoconf.ac ###########################################################
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.64])
AC_INIT([VectorMath], [0.1], address@hidden)
AC_CONFIG_SRCDIR([src/VectorMath.mod])
AM_INIT_AUTOMAKE([-Wall -Werror foreign])
# Checks for programs.
AC_PROG_CC
AC_PATH_TOOL([M2C], [gm2])
if test -z "$M2C"; then
AC_MSG_ERROR([Cannot find GNU Modula-2 compiler])
else
M2FLAGS="-c -fiso"
AC_SUBST([M2FLAGS])
SUFFIXES=".mod"
AC_SUBST([SUFFIXES])
fi
AC_PROG_RANLIB
AC_CONFIG_FILES([Makefile
src/Makefile
test/Makefile
doc/Makefile])
AC_OUTPUT
It still archives the objects and I have to put the ".a" at the end of
the library name.
Any ideas how to optimize this?