[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 |
---|
[fa4805f] | 12 | ## Last Modified By : Andrew Beach |
---|
| 13 | ## Last Modified On : Wed Jun 28 15:36:00 2017 |
---|
| 14 | ## Update Count : 215 |
---|
[00cc023] | 15 | ############################################################################### |
---|
| 16 | |
---|
[a922e34] | 17 | # create object files in directory with source files |
---|
| 18 | AUTOMAKE_OPTIONS = subdir-objects |
---|
| 19 | |
---|
[088a5cd] | 20 | libdir = ${CFA_LIBDIR} |
---|
[3d50aaf] | 21 | lib_LIBRARIES = |
---|
| 22 | |
---|
| 23 | if BUILD_RELEASE |
---|
| 24 | lib_LIBRARIES += libcfa.a |
---|
| 25 | endif |
---|
| 26 | |
---|
| 27 | if BUILD_DEBUG |
---|
| 28 | lib_LIBRARIES += libcfa-d.a |
---|
| 29 | endif |
---|
[00cc023] | 30 | |
---|
[37efaf56] | 31 | libcfa_a-libcfa-prelude.o : libcfa-prelude.c |
---|
| 32 | ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@ -O2 -c -o $@ $< |
---|
[d3b7937] | 33 | |
---|
[37efaf56] | 34 | libcfa_d_a-libcfa-prelude.o : libcfa-prelude.c |
---|
| 35 | ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@ -D__CFA_DEBUG__ -O0 -c -o $@ $< |
---|
| 36 | |
---|
[27cc24e] | 37 | EXTRA_FLAGS = -g -Wall -Werror -Wno-unused-function -I${abs_top_srcdir}/src/libcfa/libhdr -imacros libcfa-prelude.c @CFA_FLAGS@ |
---|
[d7bcbf5] | 38 | |
---|
[e4745d7a] | 39 | AM_CCASFLAGS = @CFA_FLAGS@ |
---|
[37efaf56] | 40 | CFLAGS = -quiet -no-include-stdhdr -XCFA -t -B${abs_top_srcdir}/src/driver ${EXTRA_FLAGS} |
---|
[d63eeb0] | 41 | CC = ${abs_top_srcdir}/src/driver/cfa |
---|
[d3b7937] | 42 | |
---|
[64fc0ba] | 43 | headers = assert fstream iostream iterator limits math rational stdlib \ |
---|
| 44 | containers/maybe containers/pair containers/result containers/vector |
---|
[facc44f] | 45 | |
---|
| 46 | # not all platforms support concurrency, add option do disable it |
---|
| 47 | if BUILD_CONCURRENCY |
---|
[31ee19ff] | 48 | headers += concurrency/coroutine concurrency/thread concurrency/kernel concurrency/monitor |
---|
[facc44f] | 49 | endif |
---|
| 50 | |
---|
[89ce869] | 51 | libobjs = ${headers:=.o} |
---|
[24c18ea] | 52 | libsrc = libcfa-prelude.c interpose.c libhdr/libdebug.c ${headers:=.c} |
---|
[facc44f] | 53 | |
---|
| 54 | # not all platforms support concurrency, add option do disable it |
---|
| 55 | if BUILD_CONCURRENCY |
---|
[c5ac6d5] | 56 | libsrc += concurrency/CtxSwitch-@MACHINE_TYPE@.S concurrency/alarm.c concurrency/invoke.c concurrency/preemption.c |
---|
[facc44f] | 57 | endif |
---|
[ac78e25] | 58 | |
---|
[89ce869] | 59 | # extensionless header files are overridden by -o flag in default makerule => explicitly override default rule to silently do nothing |
---|
| 60 | % : %.c |
---|
| 61 | @true |
---|
[ac78e25] | 62 | |
---|
[37efaf56] | 63 | concurrency/libcfa_a-invoke.o : concurrency/invoke.c |
---|
| 64 | ${AM_V_CC}@BACKEND_CC@ -DHAVE_CONFIG_H -I. -I../.. -O2 ${EXTRA_FLAGS} -c -o $@ $< |
---|
| 65 | |
---|
[fa4805f] | 66 | libcfa_a-exception.o : exception.c |
---|
| 67 | ${AM_V_CC}@BACKEND_CC@ -DHAVE_CONFIG_H -I. -I../.. -O2 ${EXTRA_FLAGS} -c -o $@ $< |
---|
| 68 | |
---|
[37efaf56] | 69 | concurrency/libcfa_d_a-invoke.o : concurrency/invoke.c |
---|
| 70 | ${AM_V_CC}@BACKEND_CC@ -DHAVE_CONFIG_H -I. -I../.. -D__CFA_DEBUG__ -O0 ${EXTRA_FLAGS} -c -o $@ $< |
---|
[d7bcbf5] | 71 | |
---|
[fa4805f] | 72 | libcfa_d_a-exception.o : exception.c |
---|
| 73 | ${AM_V_CC}@BACKEND_CC@ -DHAVE_CONFIG_H -I. -I../.. -D__CFA_DEBUG__ -O0 ${EXTRA_FLAGS} -c -o $@ $< |
---|
| 74 | |
---|
[d0542c4] | 75 | ${libobjs} : ${abs_top_srcdir}/src/driver/cfa-cpp ${cfalib_DATA} # add dependency to cfa-cpp so all libraries are rebuilt with new translator |
---|
[d3b7937] | 76 | |
---|
[3d50aaf] | 77 | libcfa_a_SOURCES = ${libsrc} |
---|
[37efaf56] | 78 | libcfa_a_CFLAGS = -nodebug -O2 |
---|
[3d50aaf] | 79 | libcfa_d_a_SOURCES = ${libsrc} |
---|
[c038214] | 80 | libcfa_d_a_CFLAGS = -debug -O0 #No need for __CFA_DEBUG__ since we pass -debug |
---|
[bd85400] | 81 | |
---|
[ed0e67a] | 82 | stdhdr = ${shell echo stdhdr/*} |
---|
| 83 | |
---|
[e958ff8] | 84 | cfa_includedir = $(CFA_INCDIR) |
---|
[a32cfc90] | 85 | nobase_cfa_include_HEADERS = ${headers} ${stdhdr} gmp concurrency/invoke.h |
---|
[d3b7937] | 86 | |
---|
[f326f99] | 87 | CLEANFILES = libcfa-prelude.c |
---|
[159c62e] | 88 | |
---|
| 89 | maintainer-clean-local: |
---|
[796cea3] | 90 | -rm -rf ${CFA_INCDIR} ${CFA_LIBDIR} |
---|