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:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -12,6 +12,7 @@
|
||||
|
||||
# Ignore /bin/ directory
|
||||
/bin/
|
||||
/config.mk
|
||||
|
||||
# Unignore specific files.
|
||||
!.gitignore
|
||||
|
||||
20
Makefile
20
Makefile
@@ -1,12 +1,30 @@
|
||||
# dwm - dynamic window manager
|
||||
# See LICENSE file for copyright and license details.
|
||||
|
||||
include config.mk
|
||||
-include config.mk
|
||||
|
||||
VERSION = 6.7
|
||||
|
||||
INSTALL ?= install
|
||||
GZIP ?= gzip
|
||||
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)
|
||||
OBJ := $(addsuffix .o,$(SRC))
|
||||
DEP := $(addsuffix .d,$(SRC))
|
||||
|
||||
39
config.mk
39
config.mk
@@ -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
|
||||
Reference in New Issue
Block a user