1 | ######################## -*- Mode: Makefile-Automake -*- ###################### |
---|
2 | ## |
---|
3 | ## Cforall Version 1.0.0 Copyright (C) 2020 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 : Thierry Delisle |
---|
11 | ## Created On : Mon Nov 30 14:01:00 2020 |
---|
12 | ## Last Modified By : |
---|
13 | ## Last Modified On : |
---|
14 | ## Update Count : |
---|
15 | ############################################################################### |
---|
16 | |
---|
17 | AUTOMAKE_OPTIONS = foreign # do not require all the GNU file names |
---|
18 | ACLOCAL_AMFLAGS = -I automake |
---|
19 | |
---|
20 | # applies to both programs |
---|
21 | include $(top_srcdir)/tools/build/cfa.make |
---|
22 | |
---|
23 | AM_CFLAGS = -O3 -Wall -Wextra -I$(srcdir) -lrt -pthread -g # -Werror |
---|
24 | AM_CFAFLAGS = -quiet -nodebug |
---|
25 | AM_LDFLAGS = -quiet -nodebug |
---|
26 | |
---|
27 | CCLD = $(CFACC) |
---|
28 | |
---|
29 | EXTRA_PROGRAMS = httpforall .dummy_hack |
---|
30 | |
---|
31 | CLEANFILES = httpforall |
---|
32 | |
---|
33 | nodist_httpforall_SOURCES = \ |
---|
34 | filecache.cfa \ |
---|
35 | filecache.hfa \ |
---|
36 | main.cfa \ |
---|
37 | options.cfa \ |
---|
38 | options.hfa \ |
---|
39 | protocol.cfa \ |
---|
40 | protocol.hfa \ |
---|
41 | socket.cfa \ |
---|
42 | socket.hfa \ |
---|
43 | worker.cfa \ |
---|
44 | worker.hfa |
---|
45 | |
---|
46 | nodist__dummy_hack_SOURCES = .dummy_hack.c .dummy_hackxx.cpp |
---|
47 | |
---|
48 | # automake doesn't know we still need C rules so pretend like we have a C program |
---|
49 | .dummy_hack.c: |
---|
50 | @echo "int main() { return 0; }" > ${@} |
---|
51 | |
---|
52 | .dummy_hackxx.cpp: |
---|
53 | @echo "int bar() { return 0; }" > ${@} |
---|
54 | |
---|
55 | # add dependency of cfa files |
---|
56 | nodist_httpforall_OBJECTS = $(addsuffix .o, $(basename $(filter %.cfa,$(nodist_httpforall_SOURCES)))) |
---|
57 | $(nodist_httpforall_OBJECTS) : @CFACC@ @CFACPP@ |
---|
58 | |
---|
59 | # .deps inclusion is not done automatically by automake for new languages |
---|
60 | nodist_httpforall_DEPENDS = $(join \ |
---|
61 | $(addsuffix $(DEPDIR)/ , $(dir $(nodist_httpforall_OBJECTS) ) ), \ |
---|
62 | $(notdir ${nodist_httpforall_OBJECTS:.o=.Po}) \ |
---|
63 | ) |
---|
64 | |
---|
65 | -include $(nodist_httpforall_DEPENDS) |
---|
66 | |
---|
67 | list_libdeps: |
---|
68 | echo "objects: " $(nodist_httpforall_OBJECTS) |
---|
69 | echo "depends: " $(nodist_httpforall_DEPENDS) |
---|