chiark / gitweb /
RENAME TO .IN
[subdirmk.git] / lib / t / Subdir.mk.in
1 ### -*-makefile-gmake-*-
2 ###
3 ### Build script for library test
4 ###
5 ### (c) 2019 Mark Wooding
6 ###
7
8 ###----- Licensing notice ---------------------------------------------------
9 ###
10 ### This program is free software; you can redistribute it and/or modify
11 ### it under the terms of the GNU Library General Public License as
12 ### published by the Free Software Foundation; either version 2 of the
13 ### License, or (at your option) any later version.
14 ###
15 ### This program is distributed in the hope that it will be useful,
16 ### but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 ### GNU Library General Public License for more details.
19 ###
20 ### You should have received a copy of the GNU Library General Public
21 ### License along with this program; if not, write to the Free
22 ### Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
23 ### MA 02111-1307, USA.
24
25 $D_CLEANFILES           :=
26
27 $D/check:: $D/toytest.stamp
28
29 toytest_SOURCES         := $(addprefix $D/, toytest.c)
30 toytest_OBJECTS         := $(call objects, $(toytest_SOURCES))
31 toytest_LIBS             = lib/libtoy.a
32 $(call notice-objects, $(toytest_OBJECTS))
33
34 $D/toytest: $(toytest_OBJECTS) $(toytest_LIBS)
35         $(LINK) $^
36 $D_CLEANFILES           += $D/toytest
37
38 $D/toytest.stamp: $D/toytest
39         $<
40         touch $@
41 $D_CLEANFILES           += $D/toytest.stamp