switch to options.mk and add toggle.mk

This commit is contained in:
speediegq 2022-09-03 17:53:15 +02:00
parent 12bbf6da98
commit 0e4758fdfe
4 changed files with 29 additions and 24 deletions

View file

@ -1,7 +1,8 @@
# speedwm // minimal X window manager designed for productivity and aesthetics.
# See LICENSE file for copyright and license details.
include config.mk
include options.mk
include toggle.mk
SRC = drw.c speedwm.c util.c
OBJ = ${SRC:.c=.o}
@ -21,7 +22,7 @@ options:
.c.o:
${CC} -c ${CFLAGS} $<
${OBJ}: config.mk
${OBJ}: options.mk
speedwm: ${OBJ}
${CC} -o $@ ${OBJ} ${LDFLAGS} ; rm -f *.o

View file

@ -6,30 +6,12 @@
# If you use OpenBSD, uncomment this line. (remove the # at the start of the line below)
#FREETYPEINC = ${X11INC}/freetype2
# IPC
# Whether or not to compile in IPC support.
# If you use OpenBSD or FreeBSD, this is not supported. In that case comment out these three lines and set USEIPC in toggle.h to 0.
USEIPC = true # Comment if you don't use IPC
YAJLLIBS = -lyajl # Comment if you don't use IPC
YAJLINC = /usr/include/yajl # Comment if you don't use IPC
# Tag previews and window icons
# If you use tag previews or window icons (enabled by default), these must be uncommented.
# If you do not use them, disable them in toggle.h and comment these lines.
IMLIB2LIBS = -lImlib2
# Solaris support
# If you use Solaris, uncomment this line. (remove the # at the start of the line below)
#CFLAGS = -fast ${INCS} -DVERSION=\"${VERSION}\"
#LDFLAGS = ${LIBS}
# Xinerama, comment these lines if you don't want multimonitor support
# If you don't know what this means, don't change anything and install:
# Arch: libxinerama
# Gentoo: libXinerama
# Debian: libXinerama-devel
XINERAMALIBS = -lXinerama
XINERAMAFLAGS = -DXINERAMA
###################################################################################
# Compiling with -Ofast. If you're having issues (such as dwm crashing, change it to -O2. (That's not a zero)
# Using -O2 is not recommended due to the usage of Imlib2.

View file

@ -1,10 +1,10 @@
/* Toggle patches
* This header allows you to enable/disable patches that can break compability or decrease performance with certain OSes or configurations.
*/
#define USEIPC 1 /* Whether or not to use IPC. If you set this to 1, set USEIPC to true in config.mk and comment the YAJLLIBS and YAJLINC lines in config.mk. Not compatible with BSDs so for those, set this to 0. */
#define USEIPC 1 /* Whether or not to use IPC. If you set this to 1, set USEIPC to true in toggle.mk and comment the YAJLLIBS and YAJLINC lines in config.mk. Not compatible with BSDs so for those, set this to 0. */
#define USEALPHA 1 /* Whether or not to use transparency for the bar */
#define USEMOUSE 1 /* Whether or not to use mouse binds */
#define USEIMLIB2 1 /* Whether or not to use imlib2. Required by USEWINICON and USETAGPREVIEW. */
#define USEWINICON 1 /* Whether or not to use window icons. Requires imlib to be enabled in config.mk and it must be installed. */
#define USETAGPREVIEW 1 /* Whether or not to use tag previews. Requires imlib to be enabled in config.mk and it must be installed. */
#define USEWINICON 1 /* Whether or not to use window icons. Requires imlib to be enabled in toggle.mk and it must be installed. */
#define USETAGPREVIEW 1 /* Whether or not to use tag previews. Requires imlib to be enabled in toggle.mk and it must be installed. */

22
toggle.mk Normal file
View file

@ -0,0 +1,22 @@
# speedwm compilation options
#
# Depending on your configuration, you may need to uncomment some lines here.
# IPC
# Whether or not to compile in IPC support.
# If you use OpenBSD or FreeBSD, this is not supported. In that case comment out these three lines and set USEIPC in toggle.h to 0.
USEIPC = true # Comment if you don't use IPC
YAJLLIBS = -lyajl # Comment if you don't use IPC
YAJLINC = /usr/include/yajl # Comment if you don't use IPC
# Tag previews and window icons
# If you use tag previews or window icons (enabled by default), these must be uncommented.
# If you do not use them, disable them in toggle.h and comment these lines.
IMLIB2LIBS = -lImlib2
# Multimonitor support
# If you use multiple monitors (enabled by default), these must be uncommented.
# This also requires libXinerama.
# If you do not use them, comment these lines.
XINERAMALIBS = -lXinerama
XINERAMAFLAGS = -DXINERAMA