source: libcfa/src/Makefile.am @ 856dff8

arm-ehjacob/cs343-translationnew-ast-unique-expr
Last change on this file since 856dff8 was 856dff8, checked in by Thierry Delisle <tdelisle@…>, 15 months ago

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

  • Property mode set to 100644
File size: 5.8 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 $(top_srcdir)/../tools/build/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 inst_headers_src
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
41inst_headers_nosrc = \
42        bitmanip.hfa \
43        clock.hfa \
44        exception.hfa \
45        gmp.hfa \
46        math.hfa \
47        time_t.hfa \
48        bits/align.hfa \
49        bits/containers.hfa \
50        bits/debug.hfa \
51        bits/defs.hfa \
52        bits/locks.hfa \
53        concurrency/iofwd.hfa \
54        containers/list.hfa \
55        containers/stackLockFree.hfa
56
57inst_headers_src = \
58        common.hfa \
59        fstream.hfa \
60        heap.hfa \
61        iostream.hfa \
62        iterator.hfa \
63        limits.hfa \
64        parseargs.hfa \
65        rational.hfa \
66        stdlib.hfa \
67        time.hfa \
68        containers/maybe.hfa \
69        containers/pair.hfa \
70        containers/result.hfa \
71        containers/vector.hfa
72
73libsrc = ${inst_headers_src} ${inst_headers_src:.hfa=.cfa} \
74        assert.cfa \
75        bits/algorithm.hfa \
76        bits/debug.cfa \
77        exception.c \
78        exception.h \
79        interpose.cfa \
80        lsda.h \
81        startup.cfa \
82        startup.hfa \
83        virtual.c \
84        virtual.h
85
86# not all platforms support concurrency, add option do disable it
87inst_thread_headers_nosrc = \
88        bits/random.hfa \
89        concurrency/invoke.h \
90        concurrency/kernel/fwd.hfa
91
92inst_thread_headers_src = \
93        concurrency/coroutine.hfa \
94        concurrency/exception.hfa \
95        concurrency/kernel.hfa \
96        concurrency/monitor.hfa \
97        concurrency/mutex.hfa \
98        concurrency/thread.hfa
99
100thread_libsrc = ${inst_thread_headers_src} ${inst_thread_headers_src:.hfa=.cfa} \
101        bits/signal.hfa \
102        concurrency/alarm.cfa \
103        concurrency/alarm.hfa \
104        concurrency/CtxSwitch-@ARCHITECTURE@.S \
105        concurrency/invoke.c \
106        concurrency/io.cfa \
107        concurrency/io/setup.cfa \
108        concurrency/io/types.hfa \
109        concurrency/iocall.cfa \
110        concurrency/iofwd.hfa \
111        concurrency/kernel_private.hfa \
112        concurrency/kernel/startup.cfa \
113        concurrency/preemption.cfa \
114        concurrency/preemption.hfa \
115        concurrency/ready_queue.cfa \
116        concurrency/ready_subqueue.hfa \
117        concurrency/snzi.hfa \
118        concurrency/stats.cfa \
119        concurrency/stats.hfa \
120        concurrency/stats.hfa
121
122else
123inst_headers_src =
124inst_thread_headers_src =
125inst_headers_nosrc =
126inst_thread_headers_nosrc =
127libsrc =
128endif
129
130
131#----------------------------------------------------------------------------------------------------------------
132# add dependency to cfa-cpp so all libraries are rebuilt with new translator
133#@CFACC@ @CFACPP@ prelude.cfa
134
135# add dependency of cfa files
136libobjs = $(addsuffix .lo, $(basename $(filter %.cfa,$(libsrc))))
137$(libobjs) : @LOCAL_CFACC@ @CFACPP@ prelude.cfa
138
139thread_libobjs = $(addsuffix .lo, $(basename $(filter %.cfa,$(thread_libsrc))))
140$(thread_libobjs) : @LOCAL_CFACC@ @CFACPP@ prelude.cfa
141
142
143# .deps inclusion is not done automatically by automake for new languages
144libdeps = $(join \
145        $(addsuffix $(DEPDIR)/ , $(dir $(libobjs) ) ), \
146        $(notdir ${libobjs:.lo=.Plo}) \
147)
148
149-include $(libdeps)
150
151thread_libdeps = $(join \
152        $(addsuffix $(DEPDIR)/ , $(dir $(thread_libobjs) ) ), \
153        $(notdir ${thread_libobjs:.lo=.Plo}) \
154)
155
156-include $(thread_libdeps)
157
158
159if ENABLE_DISTCC
160
161../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
162        @+make -C ../prelude distribution
163
164prelude.o prelude.lo $(libobjs) $(thread_libobjs) : ../prelude/distribution
165
166endif ENABLE_DISTCC
167
168prelude.o : prelude.cfa extras.cf gcc-builtins.cf builtins.cf @LOCAL_CFACC@ @CFACPP@
169        ${AM_V_GEN}$(CFACOMPILE) -quiet -XCFA,-l ${<} -c -o ${@}
170
171prelude.lo: prelude.cfa extras.cf gcc-builtins.cf builtins.cf @LOCAL_CFACC@ @CFACPP@
172        ${AM_V_GEN}$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile \
173        $(CFACOMPILE) -quiet -XCFA,-l ${<} -c -o ${@}
174
175#----------------------------------------------------------------------------------------------------------------
176libcfa_la_SOURCES = ${libsrc}
177nodist_libcfa_la_SOURCES = prelude.cfa
178libcfa_la_LDFLAGS = -version-info @CFA_VERSION@
179
180libcfathread_la_SOURCES = ${thread_libsrc}
181libcfathread_la_LDFLAGS = -version-info @CFA_VERSION@
182
183stdhdr = $(shell find $(srcdir)/stdhdr -type f -printf "%p ")
184
185cfa_includedir = $(CFA_INCDIR)
186nobase_cfa_include_HEADERS = ${stdhdr} ${inst_headers_src} ${inst_headers_nosrc} ${inst_thread_headers_src} ${inst_thread_headers_nosrc}
187EXTRA_DIST = stdhdr
188
189#----------------------------------------------------------------------------------------------------------------
190maintainer-clean-local:
191        -rm -rf ${CFA_INCDIR} ${CFA_LIBDIR}
192
193
194# $(AM_V_CFA)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
195#       $(CFACOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
196#       $(am__mv) $$depbase.Tpo $$depbase.Po
Note: See TracBrowser for help on using the repository browser.