source: libcfa/src/Makefile.am@ b544afa

ADT arm-eh ast-experimental enum forall-pointer-decay jacob/cs343-translation jenkins-sandbox new-ast new-ast-unique-expr pthread-emulation qualifiedEnum
Last change on this file since b544afa was dee1f89, checked in by Thierry Delisle <tdelisle@…>, 6 years ago

Libcfa make can now stop cfa-cpp when starting so a gdb session will be attached to it.
Use make ... gdbwaittarget=FILENAME where the filename is the same as the one printed when building with the silent rules.
cfa-cpp will print the gdb command to attach to it.
You may need to change linux permissions for gdb attach, just Google it.

  • Property mode set to 100644
File size: 4.3 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 Jul 15 22:43:27 2019
14## Update Count : 241
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 -in-tree -I$(srcdir)/stdhdr $(if $(findstring ${gdbwaittarget}, ${@}), -XCFA --gdb) @CONFIG_CFAFLAGS@
35AM_CFLAGS = -g -Wall -Wno-unused-function -fPIC @ARCH_FLAGS@ @CONFIG_CFLAGS@
36AM_CCASFLAGS = -g -Wall -Wno-unused-function @ARCH_FLAGS@ @CONFIG_CFLAGS@
37CFACC = @CFACC@
38
39#----------------------------------------------------------------------------------------------------------------
40if BUILDLIB
41headers_nosrc = math.hfa gmp.hfa time_t.hfa bits/align.hfa bits/containers.hfa bits/defs.hfa bits/debug.hfa bits/locks.hfa
42headers = fstream.hfa iostream.hfa iterator.hfa limits.hfa rational.hfa time.hfa stdlib.hfa common.hfa \
43 containers/maybe.hfa containers/pair.hfa containers/result.hfa containers/vector.hfa
44
45libsrc = startup.cfa interpose.cfa bits/debug.cfa assert.cfa exception.c virtual.c heap.cfa ${headers:.hfa=.cfa}
46
47# not all platforms support concurrency, add option do disable it
48thread_headers_nosrc = concurrency/invoke.h
49thread_headers = concurrency/coroutine.hfa concurrency/thread.hfa concurrency/kernel.hfa concurrency/monitor.hfa concurrency/mutex.hfa
50thread_libsrc = concurrency/CtxSwitch-@ARCHITECTURE@.S concurrency/alarm.cfa concurrency/invoke.c concurrency/preemption.cfa ${thread_headers:.hfa=.cfa}
51else
52headers =
53thread_headers =
54headers_nosrc =
55thread_headers_nosrc =
56libsrc =
57endif
58
59
60#----------------------------------------------------------------------------------------------------------------
61# add dependency to cfa-cpp so all libraries are rebuilt with new translator
62#@CFACC@ @CFACPP@ prelude.cfa
63
64# add dependency of cfa files
65libobjs = $(addsuffix .lo, $(basename $(filter %.cfa,$(libsrc))))
66$(libobjs) : @CFACC@ @CFACPP@ prelude.cfa
67
68thread_libobjs = $(addsuffix .lo, $(basename $(filter %.cfa,$(thread_libsrc))))
69$(thread_libobjs) : @CFACC@ @CFACPP@ prelude.cfa
70
71
72# .deps inclusion is not done automatically by automake for new languages
73libdeps = $(join \
74 $(addsuffix $(DEPDIR)/ , $(dir $(libobjs) ) ), \
75 $(notdir ${libobjs:.lo=.Plo}) \
76)
77
78-include $(libdeps)
79
80thread_libdeps = $(join \
81 $(addsuffix $(DEPDIR)/ , $(dir $(thread_libobjs) ) ), \
82 $(notdir ${thread_libobjs:.lo=.Plo}) \
83)
84
85-include $(thread_libdeps)
86
87
88prelude.o : prelude.cfa extras.cf gcc-builtins.cf builtins.cf @CFACC@ @CFACPP@
89 ${AM_V_GEN}$(CFACOMPILE) -quiet -in-tree -XCFA -l ${<} -c -o ${@}
90
91prelude.lo: prelude.cfa extras.cf gcc-builtins.cf builtins.cf @CFACC@ @CFACPP@
92 ${AM_V_GEN}$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile \
93 $(CFACOMPILE) -quiet -in-tree -XCFA -l ${<} -c -o ${@}
94
95
96#----------------------------------------------------------------------------------------------------------------
97libcfa_la_SOURCES = prelude.cfa ${libsrc}
98libcfa_la_LDFLAGS = -version-info @CFA_VERSION@
99
100libcfathread_la_SOURCES = ${thread_libsrc}
101libcfathread_la_LDFLAGS = -version-info @CFA_VERSION@
102
103stdhdr = $(shell find $(srcdir)/stdhdr -type f -printf "%p ")
104
105cfa_includedir = $(CFA_INCDIR)
106nobase_cfa_include_HEADERS = ${stdhdr} ${headers} ${headers_nosrc} ${thread_headers} ${thread_headers_nosrc}
107
108#----------------------------------------------------------------------------------------------------------------
109maintainer-clean-local:
110 -rm -rf ${CFA_INCDIR} ${CFA_LIBDIR}
111
112
113# $(AM_V_CFA)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
114# $(CFACOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
115# $(am__mv) $$depbase.Tpo $$depbase.Po
Note: See TracBrowser for help on using the repository browser.