summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2022-07-15 17:45:32 -0700
committerVito Caputo <vcaputo@pengaru.com>2022-07-15 17:45:32 -0700
commitb699465ca96070557feb9e69b898ddb0d4dca2dc (patch)
tree98e53869b3fd91c110dce2149a7225a925e48a2b /src
parent27263f8abc0233e09b2383ae8af9ebb888f10960 (diff)
build: always build the rototiller bin
Now that there's the mem_fb backend, there's no need to disable producing a rototiller binary in lieu of libdrm and libsdl2. This commit also rejiggers some of the DEFAULT_VIDEO junk in main.c to ensure it falls back on "mem" should there be no drm or sdl2. For now I'm going to leave the AM_CONDITIONAL junk surrounding enabling rototiller in configure.ac, the define can just be ignored for now.
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am2
-rw-r--r--src/main.c13
2 files changed, 12 insertions, 3 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 89120ad..84fdea1 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -5,7 +5,6 @@ libtil_la_SOURCES = til_args.c til_args.h til_fb.c til_fb.h til_knobs.h til.c ti
libtil_la_CPPFLAGS = -I@top_srcdir@/src
libtil_la_LIBADD = modules/blinds/libblinds.la modules/checkers/libcheckers.la modules/compose/libcompose.la modules/drizzle/libdrizzle.la modules/flui2d/libflui2d.la modules/julia/libjulia.la modules/meta2d/libmeta2d.la modules/moire/libmoire.la modules/montage/libmontage.la modules/pixbounce/libpixbounce.la modules/plasma/libplasma.la modules/plato/libplato.la modules/ray/libray.la modules/roto/libroto.la modules/rtv/librtv.la modules/shapes/libshapes.la modules/snow/libsnow.la modules/sparkler/libsparkler.la modules/spiro/libspiro.la modules/stars/libstars.la modules/submit/libsubmit.la modules/swab/libswab.la modules/swarm/libswarm.la modules/voronoi/libvoronoi.la libs/grid/libgrid.la libs/puddle/libpuddle.la libs/ray/libray.la libs/sig/libsig.la libs/txt/libtxt.la libs/ascii/libascii.la libs/din/libdin.la
-if ENABLE_ROTOTILLER
bin_PROGRAMS = rototiller
rototiller_SOURCES = fps.c fps.h main.c mem_fb.c setup.h setup.c til.h til_fb.c til_fb.h til_knobs.h til_settings.c til_settings.h til_threads.c til_threads.h til_util.c til_util.h
if ENABLE_SDL
@@ -15,4 +14,3 @@ if ENABLE_DRM
rototiller_SOURCES += drm_fb.c
endif
rototiller_LDADD = libtil.la -lm
-endif
diff --git a/src/main.c b/src/main.c
index c22eb3c..38a99d0 100644
--- a/src/main.c
+++ b/src/main.c
@@ -27,11 +27,22 @@
* another page so we can begin rendering another frame before vsync. With
* just two pages we end up twiddling thumbs until the vsync arrives.
*/
+
+#ifndef DEFAULT_VIDEO
#ifdef HAVE_SDL
#define DEFAULT_VIDEO "sdl"
-#else
+#endif
+#endif
+
+#ifndef DEFAULT_VIDEO
+#ifdef HAVE_DRM
#define DEFAULT_VIDEO "drm"
#endif
+#endif
+
+#ifndef DEFAULT_VIDEO
+#define DEFAULT_VIDEO "mem"
+#endif
extern til_fb_ops_t drm_fb_ops;
extern til_fb_ops_t mem_fb_ops;
© All Rights Reserved