[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} |
---|
[c59712e] | 22 | lib_LIBRARIES = libcfa.a |
---|
[3d50aaf] | 23 | |
---|
[c59712e] | 24 | libcfa-prelude.o : libcfa-prelude.c |
---|
[adb4a3a] | 25 | ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@ -Wall -O2 -c -o $@ $< |
---|
[d3b7937] | 26 | |
---|
[e68b3a8] | 27 | EXTRA_FLAGS = -g -Wall -Wno-unused-function -imacros libcfa-prelude.c @CFA_FLAGS@ $(DEFAULT_INCLUDES) |
---|
[d7bcbf5] | 28 | |
---|
[e4745d7a] | 29 | AM_CCASFLAGS = @CFA_FLAGS@ |
---|
[d746bc8] | 30 | |
---|
| 31 | #CFLAGS for most libcfa src |
---|
| 32 | #use -no-include-stdhdr to prevent rebuild cycles |
---|
| 33 | #The built sources must not depend on the installed headers |
---|
[7fb69f6] | 34 | CFLAGS = -quiet -no-include-stdhdr @BUILD_IN_TREE_FLAGS@ ${EXTRA_FLAGS} |
---|
[50697b0] | 35 | CC = @CFACC@ |
---|
[d3b7937] | 36 | |
---|
[0fc52b6] | 37 | headers = fstream iostream iterator limits rational time stdlib common \ |
---|
[64fc0ba] | 38 | containers/maybe containers/pair containers/result containers/vector |
---|
[facc44f] | 39 | |
---|
| 40 | # not all platforms support concurrency, add option do disable it |
---|
[09800e9] | 41 | headers += concurrency/coroutine concurrency/thread concurrency/kernel concurrency/monitor concurrency/mutex |
---|
[facc44f] | 42 | |
---|
[89ce869] | 43 | libobjs = ${headers:=.o} |
---|
[c2ea058] | 44 | libsrc = libcfa-prelude.c startup.c interpose.c bits/debug.c assert.c exception.c virtual.c heap.c \ |
---|
[891790ef] | 45 | ${headers:=.c} |
---|
[facc44f] | 46 | |
---|
| 47 | # not all platforms support concurrency, add option do disable it |
---|
[c5ac6d5] | 48 | libsrc += concurrency/CtxSwitch-@MACHINE_TYPE@.S concurrency/alarm.c concurrency/invoke.c concurrency/preemption.c |
---|
[ac78e25] | 49 | |
---|
[89ce869] | 50 | # extensionless header files are overridden by -o flag in default makerule => explicitly override default rule to silently do nothing |
---|
[4f18de3] | 51 | # SKULLDUGGERY in order to make sure this isn't called make the rule always fail but also create a rule for headers |
---|
[89ce869] | 52 | % : %.c |
---|
[4f18de3] | 53 | echo "Dummy rule, should never be called" |
---|
| 54 | false |
---|
| 55 | |
---|
| 56 | # This rule should always match headers and since it has no prerequisite it will never be called |
---|
| 57 | $(addprefix $(srcdir)/,$(headers)): |
---|
| 58 | echo "Dummy rule, should never be called" |
---|
| 59 | false |
---|
[ac78e25] | 60 | |
---|
[c59712e] | 61 | concurrency/invoke.o : concurrency/invoke.c |
---|
[37efaf56] | 62 | ${AM_V_CC}@BACKEND_CC@ -DHAVE_CONFIG_H -I. -I../.. -D__CFA_DEBUG__ -O0 ${EXTRA_FLAGS} -c -o $@ $< |
---|
[d7bcbf5] | 63 | |
---|
[c59712e] | 64 | exception.o : exception.c |
---|
[fa4805f] | 65 | ${AM_V_CC}@BACKEND_CC@ -DHAVE_CONFIG_H -I. -I../.. -D__CFA_DEBUG__ -O0 ${EXTRA_FLAGS} -c -o $@ $< |
---|
| 66 | |
---|
[c59712e] | 67 | virtual.o : virtual.c |
---|
[6ea87486] | 68 | ${AM_V_CC}@BACKEND_CC@ -DHAVE_CONFIG_H -I. -I../.. -D__CFA_DEBUG__ -O0 ${EXTRA_FLAGS} -c -o $@ $< |
---|
| 69 | |
---|
[50697b0] | 70 | ${libobjs} : @CFACPP@ ${cfalib_DATA} # add dependency to cfa-cpp so all libraries are rebuilt with new translator |
---|
[d3b7937] | 71 | |
---|
[3d50aaf] | 72 | libcfa_a_SOURCES = ${libsrc} |
---|
[37efaf56] | 73 | libcfa_a_CFLAGS = -nodebug -O2 |
---|
[bd85400] | 74 | |
---|
[e9546f9] | 75 | stdhdr = ${shell find ${srcdir}/stdhdr -type f -printf "%p "} |
---|
[ed0e67a] | 76 | |
---|
[e958ff8] | 77 | cfa_includedir = $(CFA_INCDIR) |
---|
[ea7d2b0] | 78 | nobase_cfa_include_HEADERS = \ |
---|
[0fc52b6] | 79 | ${headers} \ |
---|
| 80 | ${stdhdr} \ |
---|
| 81 | math \ |
---|
| 82 | gmp \ |
---|
| 83 | time_t.h \ |
---|
[c2b9f21] | 84 | bits/align.h \ |
---|
[0fc52b6] | 85 | bits/containers.h \ |
---|
[ea7d2b0] | 86 | bits/defs.h \ |
---|
[875a72f] | 87 | bits/debug.h \ |
---|
[ea7d2b0] | 88 | bits/locks.h \ |
---|
[c2b9f21] | 89 | concurrency/invoke.h |
---|
[d3b7937] | 90 | |
---|
[f326f99] | 91 | CLEANFILES = libcfa-prelude.c |
---|
[159c62e] | 92 | |
---|
| 93 | maintainer-clean-local: |
---|
[796cea3] | 94 | -rm -rf ${CFA_INCDIR} ${CFA_LIBDIR} |
---|