Move to host.mk for system options

This commit is contained in:
speediegq 2022-10-05 13:00:54 +02:00
parent 57a0e3fb8f
commit c011940b0a
3 changed files with 34 additions and 35 deletions

View file

@ -1,7 +1,9 @@
# speedwm // minimal X window manager designed for productivity and aesthetics. # speedwm // minimal X window manager designed for productivity and aesthetics.
# See LICENSE file for copyright and license details. # See LICENSE file for copyright and license details.
# include make config
include options.mk include options.mk
include host.mk
include toggle.mk include toggle.mk
SRC = drw.c speedwm.c util.c SRC = drw.c speedwm.c util.c

27
host.mk Normal file
View file

@ -0,0 +1,27 @@
# speedwm host options
# See README.md for more options.
# Compiler
CC = cc
# Paths
# These should be fine for most users but if you use a distribution of GNU/Linux like NixOS or GNU Guix, consider changing this to fit your use case.
# HTMLDIR is only useful if you are using 'make release'.
PREFIX = /usr
HTMLDIR = "/home/anon/Projects/page"
# GNU/Linux support
# If you use GNU/Linux, uncomment these lines (remove the # at the start of the line below)
FREETYPELIBS = -lfontconfig -lXft
FREETYPEINC = /usr/include/freetype2
CFLAGS = -std=c99 -pedantic -Wall -Wno-deprecated-declarations -Wno-unused-variable -Wno-unused-result -Ofast -march=native ${INCS} ${CPPFLAGS}
LDFLAGS = ${LIBS}
# OpenBSD support
# If you use OpenBSD, uncomment these lines. (remove the # at the start of the line below)
#FREETYPEINC = ${X11INC}/freetype2
# Solaris support
# If you use Solaris, uncomment these lines. (remove the # at the start of the line below)
#CFLAGS = -fast ${INCS} -DVERSION=\"${VERSION}\"
#LDFLAGS = ${LIBS}

View file

@ -1,34 +1,6 @@
# speedwm compilation options # speedwm options
# # The default configuration is only compiled for your host.
# Depending on your configuration, you may need to uncomment some lines here. # Change CFLAGS to override this.
# OpenBSD support
# If you use OpenBSD, uncomment this line. (remove the # at the start of the line below)
#FREETYPEINC = ${X11INC}/freetype2
# 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}
###################################################################################
# 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.
# If these features are used, they will be slow with the use of -O2.
CFLAGS = -std=c99 -pedantic -Wall -Wno-deprecated-declarations -Wno-unused-variable -Ofast -march=native ${INCS} ${CPPFLAGS}
LDFLAGS = ${LIBS}
# Compiler and linker.
# You can swap this out if you know what you're doing.
CC = cc
# Paths
# These should be fine for most users but if you use a distribution of GNU/Linux like NixOS or GNU Guix, consider changing this to fit your use case.
# HTMLDIR is only useful if you are using 'make release'.
PREFIX = /usr
HTMLDIR = "/home/anon/Projects/spdgmr.github.io/"
################################################################################### ###################################################################################
# speedwm version # speedwm version
@ -37,13 +9,11 @@ VERSION = 0.4
X11INC = /usr/X11R6/include X11INC = /usr/X11R6/include
X11LIB = /usr/X11R6/lib X11LIB = /usr/X11R6/lib
# freetype
FREETYPELIBS = -lfontconfig -lXft
FREETYPEINC = /usr/include/freetype2
# includes and libs # includes and libs
INCS = -I${X11INC} -I${FREETYPEINC} -I${YAJLINC} INCS = -I${X11INC} -I${FREETYPEINC} -I${YAJLINC}
LIBS = -L${X11LIB} -lX11 ${XINERAMALIBS} ${FREETYPELIBS} -lXrender ${IMLIB2LIBS} -lX11-xcb -lxcb -lxcb-res -lXext ${YAJLLIBS} LIBS = -L${X11LIB} -lX11 ${XINERAMALIBS} ${FREETYPELIBS} -lXrender ${IMLIB2LIBS} -lX11-xcb -lxcb -lxcb-res -lXext ${YAJLLIBS}
# flags # flags
CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_C_SOURCE=200809L -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS} CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_C_SOURCE=200809L -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS}
# NOTE: host.mk and toggle.mk will both override this.