Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/Makefile.am

    r38d12e7 re523b07  
    1717# create object files in directory with source files
    1818AUTOMAKE_OPTIONS = foreign subdir-objects
    19 ACLOCAL_AMFLAGS  = -I automake
    2019ARFLAGS = cr
    2120
     
    2322
    2423libdir = ${CFA_LIBDIR}
    25 lib_LTLIBRARIES =  libcfa.la
     24lib_LIBRARIES =  libcfa.a
     25
     26VPATH += :../prelude
    2627
    2728# AM_CFLAGS for all cfa source
     
    2930# use -no-include-stdhdr to prevent rebuild cycles
    3031# The built sources must not depend on the installed headers
    31 AM_CFAFLAGS = -quiet -in-tree -imacros prelude.c -I$(srcdir)/stdhdr @CONFIG_CFAFLAGS@
    32 AM_CFLAGS = -g -Wall -Wno-unused-function -fPIC @ARCH_FLAGS@ @CONFIG_CFLAGS@
     32AM_CFAFLAGS = -quiet -in-tree -I$(srcdir)/stdhdr @CONFIG_CFAFLAGS@
     33AM_CFLAGS = -g -Wall -Wno-unused-function @ARCH_FLAGS@ @CONFIG_CFLAGS@
    3334AM_CCASFLAGS = -g -Wall -Wno-unused-function @ARCH_FLAGS@ @CONFIG_CFLAGS@
    3435CFACC = @CFACC@
    3536
    3637#----------------------------------------------------------------------------------------------------------------
     38if BUILDLIB
    3739headers = fstream.hfa iostream.hfa iterator.hfa limits.hfa rational.hfa time.hfa stdlib.hfa common.hfa \
    3840          containers/maybe.hfa containers/pair.hfa containers/result.hfa containers/vector.hfa
     41
     42headers_nosrc = math.hfa gmp.hfa time_t.hfa bits/align.hfa bits/containers.hfa bits/defs.hfa bits/debug.hfa bits/locks.hfa
    3943
    4044# not all platforms support concurrency, add option do disable it
    4145headers += concurrency/coroutine.hfa concurrency/thread.hfa concurrency/kernel.hfa concurrency/monitor.hfa concurrency/mutex.hfa
    4246
    43 libobjs = ${headers:.hfa=.lo}
    44 libsrc = prelude.c startup.cfa interpose.cfa bits/debug.cfa assert.cfa exception.c virtual.c heap.cfa \
    45         ${headers:.hfa=.cfa}
     47headers_nosrc += concurrency/invoke.h
     48
     49libsrc = startup.cfa interpose.cfa bits/debug.cfa assert.cfa exception.c virtual.c heap.cfa ${headers:.hfa=.cfa}
    4650
    4751# not all platforms support concurrency, add option do disable it
    4852libsrc += concurrency/CtxSwitch-@ARCHITECTURE@.S concurrency/alarm.cfa concurrency/invoke.c concurrency/preemption.cfa
     53else
     54headers =
     55headers_nosrc =
     56libsrc =
     57endif
     58
    4959
    5060#----------------------------------------------------------------------------------------------------------------
    5161# add dependency to cfa-cpp so all libraries are rebuilt with new translator
    52 ${libobjs} : ${cfalib_DATA}
     62#@CFACC@ @CFACPP@ prelude.cfa
    5363
    54 libcfa_la_SOURCES = ${libsrc}
     64# add dependency of cfa files
     65libobjs = $(addsuffix .o, $(basename $(filter %.cfa,$(libsrc))))
     66$(libobjs) : @CFACC@ @CFACPP@ prelude.cfa
    5567
    56 stdhdr = $(shell find $(srcdir)/stdhdr -type f -printf "%p ")
     68
     69# .deps inclusion is not done automatically by automake for new languages
     70libdeps = $(join \
     71        $(addsuffix $(DEPDIR)/ , $(dir $(libobjs) ) ), \
     72        $(notdir ${libobjs:.o=.Po}) \
     73)
     74
     75-include $(libdeps)
     76
     77prelude.o : prelude.cfa extras.cf gcc-builtins.cf builtins.cf @CFACC@ @CFACPP@
     78        ${AM_V_GEN}@CFACC@ ${AM_CFLAGS} ${CFLAGS} -quiet -in-tree -XCFA -l ${<} -c -o ${@}
     79
     80
     81
     82#----------------------------------------------------------------------------------------------------------------
     83libcfa_a_SOURCES = prelude.cfa ${libsrc}
     84
     85stdhdr = ${shell find ${srcdir}/stdhdr -type f -printf "%p "}
    5786
    5887cfa_includedir = $(CFA_INCDIR)
    59 nobase_cfa_include_HEADERS = \
    60         ${headers}             \
    61         ${stdhdr}              \
    62         math.hfa               \
    63         gmp.hfa                \
    64         time_t.hfa             \
    65         bits/align.hfa         \
    66         bits/containers.hfa    \
    67         bits/defs.hfa          \
    68         bits/debug.hfa         \
    69         bits/locks.hfa         \
    70         concurrency/invoke.h
    71 
    72 MOSTLYCLEANFILES = prelude.c
     88nobase_cfa_include_HEADERS = ${stdhdr} ${headers} ${headers_nosrc}
    7389
    7490#----------------------------------------------------------------------------------------------------------------
    7591maintainer-clean-local:
    7692        -rm -rf ${CFA_INCDIR} ${CFA_LIBDIR}
     93
     94
     95# $(AM_V_CFA)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
     96#       $(CFACOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
     97#       $(am__mv) $$depbase.Tpo $$depbase.Po
Note: See TracChangeset for help on using the changeset viewer.