Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/libcfa/Makefile.am

    r6d665d9 rc5a8c5b  
    1111## Created On       : Sun May 31 08:54:01 2015
    1212## Last Modified By : Peter A. Buhr
    13 ## Last Modified On : Fri Aug 26 12:03:37 2016
    14 ## Update Count     : 199
     13## Last Modified On : Wed Dec 14 15:17:30 2016
     14## Update Count     : 211
    1515###############################################################################
    1616
     
    1818AUTOMAKE_OPTIONS = subdir-objects
    1919
    20 lib_LIBRARIES = libcfa.a
     20lib_LIBRARIES =
    2121
    22 # put into lib for now
    23 cfalibdir = ${libdir}
    24 cfalib_DATA = builtins.cf extras.cf prelude.cf
     22if BUILD_RELEASE
     23lib_LIBRARIES += libcfa.a
     24endif
    2525
    26 # create extra forward types/declarations to reduce inclusion of library files
    27 extras.cf : extras.regx extras.c
    28         ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@ -E ${srcdir}/extras.c | grep -f extras.regx > ${srcdir}/extras.cf
     26if BUILD_DEBUG
     27lib_LIBRARIES += libcfa-d.a
     28endif
    2929
    30 # create forward declarations for gcc builtins
    31 builtins.cf : builtins.c
    32         ${AM_V_GEN}if [ -e $< ] ; then \
    33                 @BACKEND_CC@ -E -P $^ | sed -e "/targetm/s/.*//" -e "/_Decimal/s/.*//" -e "s/void (const char \*)0();//" -e "s/\"//g" -e "s/\(__builtin_\) /\1/" > $@ ; \
    34         fi
     30libcfa_a-libcfa-prelude.o : libcfa-prelude.c
     31         ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@ -O2 -c -o $@ $<
    3532
    36 builtins.c : builtins.def prototypes.awk
    37         ${AM_V_GEN}if [ -e $< ] ; then \
    38                 @BACKEND_CC@ -E prototypes.c | awk -f prototypes.awk > $@ ; \
    39         fi
     33libcfa_d_a-libcfa-prelude.o : libcfa-prelude.c
     34         ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@ -D__CFA_DEBUG__ -O0 -c -o $@ $<
    4035
    41 builtins.def :
     36EXTRA_FLAGS = -g -Wall -Wno-unused-function -I${abs_top_srcdir}/src/libcfa/libhdr -imacros libcfa-prelude.c @CFA_FLAGS@
    4237
    43 prototypes.awk :
    44 
    45 MAINTAINERCLEANFILES = builtins.cf extras.cf ${addprefix ${libdir}/,${cfalib_DATA}} ${addprefix ${libdir}/,${lib_LIBRARIES}}
    46 
    47 #--------------------------------------------------
    48 
    49 libcfa-prelude.c : ${srcdir}/prelude.cf ${srcdir}/extras.cf ${srcdir}/builtins.cf
    50         ${AM_V_GEN}${abs_top_srcdir}/src/driver/cfa-cpp -l ${srcdir}/prelude.cf $@  # use src/cfa-cpp as not in lib until after install
    51 
    52 libcfa-prelude.o : libcfa-prelude.c
    53          ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@ -c -o $@ $<
    54 
    55 CFLAGS = -quiet -no-include-stdhdr -g -Wall -Wno-unused-function @CFA_FLAGS@ -B${abs_top_srcdir}/src/driver -XCFA -t # TEMPORARY: does not build with -O2
     38AM_CCASFLAGS = @CFA_FLAGS@
     39CFLAGS = -quiet -no-include-stdhdr -XCFA -t -B${abs_top_srcdir}/src/driver ${EXTRA_FLAGS}
    5640CC = ${abs_top_srcdir}/src/driver/cfa
    5741
    58 headers = limits stdlib math iostream fstream iterator rational containers/vector
     42headers = limits stdlib math iostream fstream iterator rational assert containers/vector concurrency/threads
     43runtimehdrs = concurrency
    5944libobjs = ${headers:=.o}
    6045
     
    6348        @true
    6449
     50concurrency/libcfa_a-invoke.o : concurrency/invoke.c
     51        ${AM_V_CC}@BACKEND_CC@ -DHAVE_CONFIG_H -I. -I../.. -O2 ${EXTRA_FLAGS} -c -o $@ $<
     52
     53concurrency/libcfa_d_a-invoke.o : concurrency/invoke.c
     54        ${AM_V_CC}@BACKEND_CC@ -DHAVE_CONFIG_H -I. -I../.. -D__CFA_DEBUG__ -O0 ${EXTRA_FLAGS} -c -o $@ $<
     55
    6556${libobjs} : ${abs_top_srcdir}/src/driver/cfa-cpp ${cfalib_DATA} # add dependency to cfa-cpp so all libraries are rebuilt with new translator
    6657
    67 libcfa_a_SOURCES = libcfa-prelude.c ${headers:=.c}
     58libsrc = libcfa-prelude.c ${headers:=.c} concurrency/CtxSwitch-@MACHINE_TYPE@.S concurrency/invoke.c
     59
     60libcfa_a_SOURCES = ${libsrc}
     61libcfa_a_CFLAGS = -nodebug -O2
     62libcfa_d_a_SOURCES = ${libsrc}
     63libcfa_d_a_CFLAGS = -debug -O0
    6864
    6965stdhdr = ${shell echo stdhdr/*}
    7066
    71 nobase_include_HEADERS = ${headers} ${stdhdr}
     67nobase_include_HEADERS = ${headers} ${stdhdr} concurrency/invoke.h
    7268
    7369CLEANFILES = libcfa-prelude.c
Note: See TracChangeset for help on using the changeset viewer.