1 # Copyright © 2022 Nick Bowler
3 # License WTFPL2: Do What The Fuck You Want To Public License, version 2.
4 # This is free software: you are free to do what the fuck you want to.
5 # There is NO WARRANTY, to the extent permitted by law.
7 ACLOCAL_AMFLAGS = -I m4 -I common/m4
11 MAINTAINERCLEANFILES =
13 CLEANFILES = $(EXTRA_LIBRARIES)
15 AM_CPPFLAGS = -I$(builddir)/src -I$(srcdir)/src -I$(DX_BASEDIR)/src
16 AM_CFLAGS = $(MOTIF_CFLAGS)
18 bin_PROGRAMS = rrace-motif
20 rrace_motif_SOURCES = src/game.c src/x11.c
21 rrace_motif_LDADD = $(libmotifmain_a_OBJECTS) $(libmotifui_a_OBJECTS) \
22 $(libglohelp_a_OBJECTS) $(MOTIF_LIBS)
24 EXTRA_LIBRARIES += libmotifmain.a
25 libmotifmain_a_SOURCES = src/motif.c
26 $(libmotifmain_a_OBJECTS): src/options.h
28 EXTRA_LIBRARIES += libmotifui.a
29 libmotifui_a_SOURCES = src/motif_ui.c
30 $(libmotifui_a_OBJECTS): src/motifgui.h
32 EXTRA_LIBRARIES += libglohelp.a
33 libglohelp_a_SOURCES = common/src/help.c
34 libglohelp_a_CFLAGS = -DHELP_GETOPT_LONG_ONLY
35 libglohelp_a_SHORTNAME = glo
37 OPTFILES = src/options.opt
39 $(AM_V_GEN) $(AWK) -f $(DX_BASEDIR)/scripts/gen-options.awk $< >$@.tmp
40 $(AM_V_at) mv -f $@.tmp $@
41 $(OPTFILES:.opt=.h): $(DX_BASEDIR)/scripts/gen-options.awk
42 DISTCLEANFILES += $(OPTFILES:.opt=.h)
43 EXTRA_DIST += $(DX_BASEDIR)/scripts/gen-options.awk $(OPTFILES)
45 GUIFILES = src/motifgui.dat
47 $(AM_V_GEN) $(AWK) -f $(DX_BASEDIR)/scripts/gen-tree.awk $< >$@.tmp
48 $(AM_V_at) mv -f $@.tmp $@
49 $(GUIFILES:.dat=.h): $(DX_BASEDIR)/scripts/gen-tree.awk
50 DISTCLEANFILES += $(GUIFILES:.dat=.h)
51 EXTRA_DIST += $(DX_BASEDIR)/scripts/gen-tree.awk $(GUIFILES)
53 check_PROGRAMS = t/boardmove t/rng-test
55 t_boardmove_LDADD = src/game.$(OBJEXT)
57 include $(top_srcdir)/common/snippet/autotest.mk