[00cc023] | 1 | ######################## -*- Mode: Makefile-Automake -*- ######################
|
---|
| 2 | ##
|
---|
| 3 | ## Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
|
---|
| 4 | ##
|
---|
| 5 | ## The contents of this file are covered under the licence agreement in the
|
---|
| 6 | ## file "LICENCE" distributed with Cforall.
|
---|
| 7 | ##
|
---|
[d63eeb0] | 8 | ## Makefile.am --
|
---|
[00cc023] | 9 | ##
|
---|
| 10 | ## Author : Peter A. Buhr
|
---|
| 11 | ## Created On : Sun May 31 08:54:01 2015
|
---|
| 12 | ## Last Modified By : Peter A. Buhr
|
---|
[375a068] | 13 | ## Last Modified On : Wed Dec 14 15:17:30 2016
|
---|
| 14 | ## Update Count : 211
|
---|
[00cc023] | 15 | ###############################################################################
|
---|
| 16 |
|
---|
[a922e34] | 17 | # create object files in directory with source files
|
---|
| 18 | AUTOMAKE_OPTIONS = subdir-objects
|
---|
| 19 |
|
---|
[3d50aaf] | 20 | lib_LIBRARIES =
|
---|
| 21 |
|
---|
| 22 | if BUILD_RELEASE
|
---|
| 23 | lib_LIBRARIES += libcfa.a
|
---|
| 24 | endif
|
---|
| 25 |
|
---|
| 26 | if BUILD_DEBUG
|
---|
| 27 | lib_LIBRARIES += libcfa-d.a
|
---|
| 28 | endif
|
---|
[00cc023] | 29 |
|
---|
[37efaf56] | 30 | libcfa_a-libcfa-prelude.o : libcfa-prelude.c
|
---|
| 31 | ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@ -O2 -c -o $@ $<
|
---|
[d3b7937] | 32 |
|
---|
[37efaf56] | 33 | libcfa_d_a-libcfa-prelude.o : libcfa-prelude.c
|
---|
| 34 | ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@ -D__CFA_DEBUG__ -O0 -c -o $@ $<
|
---|
| 35 |
|
---|
[c5a8c5b] | 36 | EXTRA_FLAGS = -g -Wall -Wno-unused-function -I${abs_top_srcdir}/src/libcfa/libhdr -imacros libcfa-prelude.c @CFA_FLAGS@
|
---|
[d7bcbf5] | 37 |
|
---|
[e4745d7a] | 38 | AM_CCASFLAGS = @CFA_FLAGS@
|
---|
[37efaf56] | 39 | CFLAGS = -quiet -no-include-stdhdr -XCFA -t -B${abs_top_srcdir}/src/driver ${EXTRA_FLAGS}
|
---|
[d63eeb0] | 40 | CC = ${abs_top_srcdir}/src/driver/cfa
|
---|
[d3b7937] | 41 |
|
---|
[facc44f] | 42 | headers = limits stdlib math iostream fstream iterator rational assert
|
---|
| 43 |
|
---|
| 44 | # not all platforms support concurrency, add option do disable it
|
---|
| 45 | if BUILD_CONCURRENCY
|
---|
[eac73eb] | 46 | headers += containers/vector concurrency/coroutines concurrency/threads concurrency/kernel concurrency/monitor
|
---|
[facc44f] | 47 | endif
|
---|
| 48 |
|
---|
[89ce869] | 49 | libobjs = ${headers:=.o}
|
---|
[facc44f] | 50 | libsrc = libcfa-prelude.c ${headers:=.c}
|
---|
| 51 |
|
---|
| 52 | # not all platforms support concurrency, add option do disable it
|
---|
| 53 | if BUILD_CONCURRENCY
|
---|
| 54 | libsrc += concurrency/CtxSwitch-@MACHINE_TYPE@.S concurrency/invoke.c
|
---|
| 55 | endif
|
---|
[ac78e25] | 56 |
|
---|
[89ce869] | 57 | # extensionless header files are overridden by -o flag in default makerule => explicitly override default rule to silently do nothing
|
---|
| 58 | % : %.c
|
---|
| 59 | @true
|
---|
[ac78e25] | 60 |
|
---|
[37efaf56] | 61 | concurrency/libcfa_a-invoke.o : concurrency/invoke.c
|
---|
| 62 | ${AM_V_CC}@BACKEND_CC@ -DHAVE_CONFIG_H -I. -I../.. -O2 ${EXTRA_FLAGS} -c -o $@ $<
|
---|
| 63 |
|
---|
| 64 | concurrency/libcfa_d_a-invoke.o : concurrency/invoke.c
|
---|
| 65 | ${AM_V_CC}@BACKEND_CC@ -DHAVE_CONFIG_H -I. -I../.. -D__CFA_DEBUG__ -O0 ${EXTRA_FLAGS} -c -o $@ $<
|
---|
[d7bcbf5] | 66 |
|
---|
[d0542c4] | 67 | ${libobjs} : ${abs_top_srcdir}/src/driver/cfa-cpp ${cfalib_DATA} # add dependency to cfa-cpp so all libraries are rebuilt with new translator
|
---|
[d3b7937] | 68 |
|
---|
[3d50aaf] | 69 |
|
---|
| 70 | libcfa_a_SOURCES = ${libsrc}
|
---|
[37efaf56] | 71 | libcfa_a_CFLAGS = -nodebug -O2
|
---|
[3d50aaf] | 72 | libcfa_d_a_SOURCES = ${libsrc}
|
---|
[37efaf56] | 73 | libcfa_d_a_CFLAGS = -debug -O0
|
---|
[bd85400] | 74 |
|
---|
[ed0e67a] | 75 | stdhdr = ${shell echo stdhdr/*}
|
---|
| 76 |
|
---|
[ff2d7341] | 77 | cfa_includedir = $(includedir)/cfa
|
---|
| 78 | nobase_cfa_include_HEADERS = ${headers} ${stdhdr} concurrency/invoke.h
|
---|
[d3b7937] | 79 |
|
---|
[f326f99] | 80 | CLEANFILES = libcfa-prelude.c
|
---|
[159c62e] | 81 |
|
---|
| 82 | maintainer-clean-local:
|
---|
| 83 | -rm -rf ${includedir}/*
|
---|