source: libcfa/src/Makefile.am @ 3f1d9b5

ADTarm-ehast-experimentalenumforall-pointer-decayjacob/cs343-translationnew-astnew-ast-unique-exprpthread-emulationqualifiedEnum
Last change on this file since 3f1d9b5 was 0aa20e3, checked in by Thierry Delisle <tdelisle@…>, 4 years ago

Added support for syntax -XCFA,OPTION instead of -XCFA OPTION in cfa.cc.
Now using -XCFA,-l syntax for prelude.cfa to fix distcc error

  • Property mode set to 100644
File size: 4.9 KB
Line 
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##
8## Makefile.am --
9##
10## Author           : Peter A. Buhr
11## Created On       : Sun May 31 08:54:01 2015
12## Last Modified By : Peter A. Buhr
13## Last Modified On : Mon Jun  1 13:35:33 2020
14## Update Count     : 248
15###############################################################################
16
17# create object files in directory with source files
18AUTOMAKE_OPTIONS = foreign subdir-objects
19ACLOCAL_AMFLAGS  = -I automake
20
21include $(srcdir)/../../src/cfa.make
22
23libdir = ${CFA_LIBDIR}
24lib_LTLIBRARIES = libcfa.la libcfathread.la
25
26VPATH += :../prelude
27
28gdbwaittarget=""
29
30# AM_CFLAGS for all cfa source
31# AM_CFAFLAGS for only cfa source
32# use -no-include-stdhdr to prevent rebuild cycles
33# The built sources must not depend on the installed headers
34AM_CFAFLAGS = -quiet -cfalib -I$(srcdir)/stdhdr $(if $(findstring ${gdbwaittarget}, ${@}), -XCFA --gdb) @CONFIG_CFAFLAGS@
35AM_CFLAGS = -g -Wall -Wno-unused-function -fPIC -fexceptions -pthread @ARCH_FLAGS@ @CONFIG_CFLAGS@
36AM_CCASFLAGS = -g -Wall -Wno-unused-function @ARCH_FLAGS@ @CONFIG_CFLAGS@
37CFACC = @CFACC@
38
39#----------------------------------------------------------------------------------------------------------------
40if BUILDLIB
41headers_nosrc = bitmanip.hfa exception.hfa math.hfa gmp.hfa time_t.hfa clock.hfa \
42                bits/align.hfa bits/containers.hfa bits/defs.hfa bits/debug.hfa bits/locks.hfa \
43                containers/list.hfa containers/stackLockFree.hfa concurrency/iofwd.hfa
44
45headers = common.hfa fstream.hfa heap.hfa iostream.hfa iterator.hfa limits.hfa rational.hfa \
46                time.hfa stdlib.hfa memory.hfa \
47                containers/maybe.hfa containers/pair.hfa containers/result.hfa containers/vector.hfa
48
49libsrc = startup.cfa interpose.cfa bits/debug.cfa assert.cfa exception.c virtual.c ${headers:.hfa=.cfa}
50
51# not all platforms support concurrency, add option do disable it
52thread_headers_nosrc = concurrency/invoke.h
53thread_headers = concurrency/coroutine.hfa concurrency/thread.hfa concurrency/kernel.hfa concurrency/monitor.hfa concurrency/mutex.hfa
54thread_libsrc = concurrency/CtxSwitch-@ARCHITECTURE@.S concurrency/alarm.cfa concurrency/invoke.c concurrency/io.cfa concurrency/iocall.cfa concurrency/preemption.cfa concurrency/ready_queue.cfa concurrency/stats.cfa ${thread_headers:.hfa=.cfa}
55else
56headers =
57thread_headers =
58headers_nosrc =
59thread_headers_nosrc =
60libsrc =
61endif
62
63
64#----------------------------------------------------------------------------------------------------------------
65# add dependency to cfa-cpp so all libraries are rebuilt with new translator
66#@CFACC@ @CFACPP@ prelude.cfa
67
68# add dependency of cfa files
69libobjs = $(addsuffix .lo, $(basename $(filter %.cfa,$(libsrc))))
70$(libobjs) : @LOCAL_CFACC@ @CFACPP@ prelude.cfa
71
72thread_libobjs = $(addsuffix .lo, $(basename $(filter %.cfa,$(thread_libsrc))))
73$(thread_libobjs) : @LOCAL_CFACC@ @CFACPP@ prelude.cfa
74
75
76# .deps inclusion is not done automatically by automake for new languages
77libdeps = $(join \
78        $(addsuffix $(DEPDIR)/ , $(dir $(libobjs) ) ), \
79        $(notdir ${libobjs:.lo=.Plo}) \
80)
81
82-include $(libdeps)
83
84thread_libdeps = $(join \
85        $(addsuffix $(DEPDIR)/ , $(dir $(thread_libobjs) ) ), \
86        $(notdir ${thread_libobjs:.lo=.Plo}) \
87)
88
89-include $(thread_libdeps)
90
91
92if ENABLE_DISTCC
93
94../prelude/distribution: @LOCAL_CFACC@ @LOCAL_CC1@ @CFACPP@ ../prelude/gcc-builtins.cf ../prelude/builtins.cf ../prelude/extras.cf ../prelude/prelude.cfa ../prelude/bootloader.c $(srcdir)/../../tools/build/push2dist.sh
95        @+make -C ../prelude distribution
96
97prelude.o prelude.lo $(libobjs) $(thread_libobjs) : ../prelude/distribution
98
99endif ENABLE_DISTCC
100
101prelude.o : prelude.cfa extras.cf gcc-builtins.cf builtins.cf @LOCAL_CFACC@ @CFACPP@
102        ${AM_V_GEN}$(CFACOMPILE) -quiet -XCFA,-l ${<} -c -o ${@}
103
104prelude.lo: prelude.cfa extras.cf gcc-builtins.cf builtins.cf @LOCAL_CFACC@ @CFACPP@
105        ${AM_V_GEN}$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile \
106        $(CFACOMPILE) -quiet -XCFA,-l ${<} -c -o ${@}
107
108#----------------------------------------------------------------------------------------------------------------
109libcfa_la_SOURCES = prelude.cfa ${libsrc}
110libcfa_la_LDFLAGS = -version-info @CFA_VERSION@
111
112libcfathread_la_SOURCES = ${thread_libsrc}
113libcfathread_la_LDFLAGS = -version-info @CFA_VERSION@
114
115stdhdr = $(shell find $(srcdir)/stdhdr -type f -printf "%p ")
116
117cfa_includedir = $(CFA_INCDIR)
118nobase_cfa_include_HEADERS = ${stdhdr} ${headers} ${headers_nosrc} ${thread_headers} ${thread_headers_nosrc}
119
120#----------------------------------------------------------------------------------------------------------------
121maintainer-clean-local:
122        -rm -rf ${CFA_INCDIR} ${CFA_LIBDIR}
123
124
125# $(AM_V_CFA)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
126#       $(CFACOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
127#       $(am__mv) $$depbase.Tpo $$depbase.Po
Note: See TracBrowser for help on using the repository browser.