5 ### (c) 2017 Mark Wooding
8 ###----- Licensing notice ---------------------------------------------------
10 ### This file is part of Rhodes, a distributed discrete-log finder.
12 ### Rhodes is free software; you can redistribute it and/or modify
13 ### it under the terms of the GNU General Public License as published by
14 ### the Free Software Foundation; either version 2 of the License, or
15 ### (at your option) any later version.
17 ### Rhodes is distributed in the hope that it will be useful,
18 ### but WITHOUT ANY WARRANTY; without even the implied warranty of
19 ### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 ### GNU General Public License for more details.
22 ### You should have received a copy of the GNU General Public License
23 ### along with Rhodes; if not, write to the Free Software Foundation,
24 ### Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
28 ###--------------------------------------------------------------------------
29 ### What needs building.
36 factor_SRCS
= factor.c
39 ###--------------------------------------------------------------------------
47 v_tag
= $(call v_tag_
$V,$1)
48 v_tag_0
= @printf
" %-6s %s\n" $1 $@
;
53 CFLAGS
= -O2
-g
-Wall
-Werror
56 CCLINK
= $(call v_tag
,CCLD
)$(CCLD
) $(LDFLAGS
)
61 CXXFLAGS
= $(CFLAGS
) -std
=gnu
++11
63 CXXLINK
= $(call v_tag
,CXXLD
)$(CXXLD
) $(LDFLAGS
)
68 $(call v_tag
,CC
)$(CC
) -c
$(CFLAGS
) -MD
-o
$@
$<
71 $(call v_tag
,CXX
)$(CXX
) -c
$(CXXFLAGS
) -MD
-o
$@
$<
75 $(patsubst %.
cc,%.o
, \
76 $(patsubst %.s
,%.o
, $(patsubst %.S
,%.o
, \
81 $(PROGS
): %: $$(call objify
,$$($$*_SRCS
))
82 $(or
$(and
$(filter %.
cc,$($*_SRCS
)),$(CXXLINK
)),$(CCLINK
)) -o
$@ \
83 $($*_LDFLAGS
) $^
$($*_LIBS
) $(LIBS
)