| [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 | 
|---|
| [381fdee] | 12 | ## Last Modified By : Peter A. Buhr | 
|---|
| [891790ef] | 13 | ## Last Modified On : Tue Jul 24 17:25:39 2018 | 
|---|
|  | 14 | ## Update Count     : 240 | 
|---|
| [00cc023] | 15 | ############################################################################### | 
|---|
|  | 16 |  | 
|---|
| [a922e34] | 17 | # create object files in directory with source files | 
|---|
|  | 18 | AUTOMAKE_OPTIONS = subdir-objects | 
|---|
| [52a9004] | 19 | ARFLAGS = cr | 
|---|
| [a922e34] | 20 |  | 
|---|
| [088a5cd] | 21 | libdir = ${CFA_LIBDIR} | 
|---|
| [3d50aaf] | 22 | lib_LIBRARIES = | 
|---|
|  | 23 |  | 
|---|
|  | 24 | if BUILD_RELEASE | 
|---|
|  | 25 | lib_LIBRARIES += libcfa.a | 
|---|
|  | 26 | endif | 
|---|
|  | 27 |  | 
|---|
|  | 28 | if BUILD_DEBUG | 
|---|
|  | 29 | lib_LIBRARIES += libcfa-d.a | 
|---|
|  | 30 | endif | 
|---|
| [00cc023] | 31 |  | 
|---|
| [37efaf56] | 32 | libcfa_a-libcfa-prelude.o : libcfa-prelude.c | 
|---|
| [adb4a3a] | 33 | ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@ -Wall -O2 -c -o $@ $< | 
|---|
| [d3b7937] | 34 |  | 
|---|
| [37efaf56] | 35 | libcfa_d_a-libcfa-prelude.o : libcfa-prelude.c | 
|---|
| [adb4a3a] | 36 | ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@ -D__CFA_DEBUG__ -Wall -O0 -c -o $@ $< | 
|---|
| [37efaf56] | 37 |  | 
|---|
| [e68b3a8] | 38 | EXTRA_FLAGS = -g -Wall -Wno-unused-function -imacros libcfa-prelude.c @CFA_FLAGS@ $(DEFAULT_INCLUDES) | 
|---|
| [d7bcbf5] | 39 |  | 
|---|
| [e4745d7a] | 40 | AM_CCASFLAGS = @CFA_FLAGS@ | 
|---|
| [d746bc8] | 41 |  | 
|---|
|  | 42 | #CFLAGS for most libcfa src | 
|---|
|  | 43 | #use -no-include-stdhdr to prevent rebuild cycles | 
|---|
|  | 44 | #The built sources must not depend on the installed headers | 
|---|
| [e9546f9] | 45 | CFLAGS = -quiet -no-include-stdhdr -I${abs_top_srcdir}/src/libcfa/stdhdr -XCFA -t -B${abs_top_builddir}/src/driver ${EXTRA_FLAGS} | 
|---|
|  | 46 | CC = ${abs_top_builddir}/src/driver/cfa | 
|---|
| [d3b7937] | 47 |  | 
|---|
| [0fc52b6] | 48 | headers = fstream iostream iterator limits rational time stdlib common \ | 
|---|
| [64fc0ba] | 49 | containers/maybe containers/pair containers/result containers/vector | 
|---|
| [facc44f] | 50 |  | 
|---|
|  | 51 | # not all platforms support concurrency, add option do disable it | 
|---|
|  | 52 | if BUILD_CONCURRENCY | 
|---|
| [09800e9] | 53 | headers += concurrency/coroutine concurrency/thread concurrency/kernel concurrency/monitor concurrency/mutex | 
|---|
| [facc44f] | 54 | endif | 
|---|
|  | 55 |  | 
|---|
| [89ce869] | 56 | libobjs = ${headers:=.o} | 
|---|
| [c2ea058] | 57 | libsrc = libcfa-prelude.c startup.c interpose.c bits/debug.c assert.c exception.c virtual.c heap.c \ | 
|---|
| [891790ef] | 58 | ${headers:=.c} | 
|---|
| [facc44f] | 59 |  | 
|---|
|  | 60 | # not all platforms support concurrency, add option do disable it | 
|---|
|  | 61 | if BUILD_CONCURRENCY | 
|---|
| [c5ac6d5] | 62 | libsrc += concurrency/CtxSwitch-@MACHINE_TYPE@.S concurrency/alarm.c concurrency/invoke.c concurrency/preemption.c | 
|---|
| [facc44f] | 63 | endif | 
|---|
| [ac78e25] | 64 |  | 
|---|
| [89ce869] | 65 | # extensionless header files are overridden by -o flag in default makerule => explicitly override default rule to silently do nothing | 
|---|
| [4f18de3] | 66 | # SKULLDUGGERY in order to make sure this isn't called make the rule always fail but also create a rule for headers | 
|---|
| [89ce869] | 67 | % : %.c | 
|---|
| [4f18de3] | 68 | echo "Dummy rule, should never be called" | 
|---|
|  | 69 | false | 
|---|
|  | 70 |  | 
|---|
|  | 71 | # This rule should always match headers and since it has no prerequisite it will never be called | 
|---|
|  | 72 | $(addprefix $(srcdir)/,$(headers)): | 
|---|
|  | 73 | echo "Dummy rule, should never be called" | 
|---|
|  | 74 | false | 
|---|
| [ac78e25] | 75 |  | 
|---|
| [37efaf56] | 76 | concurrency/libcfa_a-invoke.o : concurrency/invoke.c | 
|---|
|  | 77 | ${AM_V_CC}@BACKEND_CC@ -DHAVE_CONFIG_H -I. -I../.. -O2 ${EXTRA_FLAGS} -c -o $@ $< | 
|---|
|  | 78 |  | 
|---|
| [fa4805f] | 79 | libcfa_a-exception.o : exception.c | 
|---|
|  | 80 | ${AM_V_CC}@BACKEND_CC@ -DHAVE_CONFIG_H -I. -I../.. -O2 ${EXTRA_FLAGS} -c -o $@ $< | 
|---|
|  | 81 |  | 
|---|
| [a5f0529] | 82 | libcfa_a-virtual.o : virtual.c | 
|---|
| [6ea87486] | 83 | ${AM_V_CC}@BACKEND_CC@ -DHAVE_CONFIG_H -I. -I../.. -O2 ${EXTRA_FLAGS} -c -o $@ $< | 
|---|
|  | 84 |  | 
|---|
| [37efaf56] | 85 | concurrency/libcfa_d_a-invoke.o : concurrency/invoke.c | 
|---|
|  | 86 | ${AM_V_CC}@BACKEND_CC@ -DHAVE_CONFIG_H -I. -I../.. -D__CFA_DEBUG__ -O0 ${EXTRA_FLAGS} -c -o $@ $< | 
|---|
| [d7bcbf5] | 87 |  | 
|---|
| [fa4805f] | 88 | libcfa_d_a-exception.o : exception.c | 
|---|
|  | 89 | ${AM_V_CC}@BACKEND_CC@ -DHAVE_CONFIG_H -I. -I../.. -D__CFA_DEBUG__ -O0 ${EXTRA_FLAGS} -c -o $@ $< | 
|---|
|  | 90 |  | 
|---|
| [a5f0529] | 91 | libcfa_d_a-virtual.o : virtual.c | 
|---|
| [6ea87486] | 92 | ${AM_V_CC}@BACKEND_CC@ -DHAVE_CONFIG_H -I. -I../.. -D__CFA_DEBUG__ -O0 ${EXTRA_FLAGS} -c -o $@ $< | 
|---|
|  | 93 |  | 
|---|
| [d0542c4] | 94 | ${libobjs} : ${abs_top_srcdir}/src/driver/cfa-cpp ${cfalib_DATA} # add dependency to cfa-cpp so all libraries are rebuilt with new translator | 
|---|
| [d3b7937] | 95 |  | 
|---|
| [3d50aaf] | 96 | libcfa_a_SOURCES = ${libsrc} | 
|---|
| [37efaf56] | 97 | libcfa_a_CFLAGS = -nodebug -O2 | 
|---|
| [3d50aaf] | 98 | libcfa_d_a_SOURCES = ${libsrc} | 
|---|
| [c038214] | 99 | libcfa_d_a_CFLAGS = -debug -O0 #No need for __CFA_DEBUG__ since we pass -debug | 
|---|
| [bd85400] | 100 |  | 
|---|
| [e9546f9] | 101 | stdhdr = ${shell find ${srcdir}/stdhdr -type f -printf "%p "} | 
|---|
| [ed0e67a] | 102 |  | 
|---|
| [e958ff8] | 103 | cfa_includedir = $(CFA_INCDIR) | 
|---|
| [ea7d2b0] | 104 | nobase_cfa_include_HEADERS =    \ | 
|---|
| [0fc52b6] | 105 | ${headers}              \ | 
|---|
|  | 106 | ${stdhdr}               \ | 
|---|
|  | 107 | math                    \ | 
|---|
|  | 108 | gmp                     \ | 
|---|
|  | 109 | time_t.h                \ | 
|---|
| [c2b9f21] | 110 | bits/align.h            \ | 
|---|
| [0fc52b6] | 111 | bits/containers.h       \ | 
|---|
| [ea7d2b0] | 112 | bits/defs.h             \ | 
|---|
| [875a72f] | 113 | bits/debug.h            \ | 
|---|
| [ea7d2b0] | 114 | bits/locks.h            \ | 
|---|
| [c2b9f21] | 115 | concurrency/invoke.h | 
|---|
| [d3b7937] | 116 |  | 
|---|
| [f326f99] | 117 | CLEANFILES = libcfa-prelude.c | 
|---|
| [159c62e] | 118 |  | 
|---|
|  | 119 | maintainer-clean-local: | 
|---|
| [796cea3] | 120 | -rm -rf ${CFA_INCDIR} ${CFA_LIBDIR} | 
|---|