Move config.mk into Makefile, and delete config.mk.

config.mk shall now contain user-specific configurations, and thus is
now ignored.
This commit is contained in:
2026-01-25 12:38:08 +01:00
parent eda3495acf
commit c23f9dfe2e
3 changed files with 20 additions and 40 deletions

1
.gitignore vendored
View File

@@ -12,6 +12,7 @@
# Ignore /bin/ directory # Ignore /bin/ directory
/bin/ /bin/
/config.mk
# Unignore specific files. # Unignore specific files.
!.gitignore !.gitignore

View File

@@ -1,12 +1,30 @@
# dwm - dynamic window manager # dwm - dynamic window manager
# See LICENSE file for copyright and license details. # See LICENSE file for copyright and license details.
include config.mk -include config.mk
VERSION = 6.7
INSTALL ?= install INSTALL ?= install
GZIP ?= gzip GZIP ?= gzip
TAR ?= tar TAR ?= tar
CFLAGS := -Os $(CFLAGS) -g -std=gnu99\
-Wall -Wextra -Wpedantic -Wno-pointer-arith
CPPFLAGS := -DNDEBUG $(CPPFLAGS)\
-DVERSION=\"$(VERSION)\" -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=700L -DXINERAMA
LDFLAGS := -flto $(LDFLAGS)
LDLIBS := $(LDLIBS) -lm
# Use pkg-config to locate dependencies, and set the correct flags.
ifeq (,$(shell command -v pkg-config))
$(error Failed to locate pkg-config, please make sure it is installed or acessible through PATH.)
else
CPPFLAGS += $(shell pkg-config --cflags-only-I x11 xinerama)
LDFLAGS += $(shell pkg-config --libs-only-L x11 xinerama)
LDLIBS += $(shell pkg-config --libs-only-l x11 xinerama)
endif
SRC := $(wildcard src/*.c) SRC := $(wildcard src/*.c)
OBJ := $(addsuffix .o,$(SRC)) OBJ := $(addsuffix .o,$(SRC))
DEP := $(addsuffix .d,$(SRC)) DEP := $(addsuffix .d,$(SRC))

View File

@@ -1,39 +0,0 @@
# dwm version
VERSION = 6.7
# Customize below to fit your system
# paths
PREFIX = /usr/local
MANPREFIX = ${PREFIX}/share/man
X11INC = /usr/X11R6/include
X11LIB = /usr/X11R6/lib
# Xinerama, comment if you don't want it
XINERAMALIBS = -lXinerama
XINERAMAFLAGS = -DXINERAMA
# freetype
FREETYPELIBS = -lfontconfig -lXft
FREETYPEINC = /usr/include/freetype2
# OpenBSD (uncomment)
#FREETYPEINC = ${X11INC}/freetype2
#MANPREFIX = ${PREFIX}/man
# includes and libs
INCS = -I${X11INC} -I${FREETYPEINC}
LIBS = -L${X11LIB} -lX11 ${XINERAMALIBS} ${FREETYPELIBS}
# flags
CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=700L -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS}
#CFLAGS = -g -std=c99 -pedantic -Wall -O0 ${INCS} ${CPPFLAGS}
CFLAGS = -std=c99 -pedantic -Wall -Wno-deprecated-declarations -Os ${INCS} ${CPPFLAGS}
LDFLAGS = ${LIBS}
# Solaris
#CFLAGS = -fast ${INCS} -DVERSION=\"${VERSION}\"
#LDFLAGS = ${LIBS}
# compiler and linker
CC = cc