Configure build
This commit is contained in:
parent
95654caff0
commit
0606973e5e
7 changed files with 55 additions and 46 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,2 +1,3 @@
|
||||||
|
/config/active.mk
|
||||||
/polytreewm
|
/polytreewm
|
||||||
/src/*.o
|
/src/*.o
|
||||||
|
|
16
Makefile
16
Makefile
|
@ -1,7 +1,16 @@
|
||||||
# PolytreeWM - tiling window manager
|
# PolytreeWM - tiling window manager
|
||||||
# See LICENSE file for copyright and license details.
|
# See LICENSE file for copyright and license details.
|
||||||
|
|
||||||
include config.mk
|
include config/active.mk
|
||||||
|
|
||||||
|
VERSION = 6.2
|
||||||
|
|
||||||
|
INCS = -I$(X11INC) -I$(FREETYPEINC)
|
||||||
|
LIBS = -L$(X11LIB) -lX11 $(XINERAMALIBS) $(FREETYPELIBS) -lX11-xcb -lxcb -lxcb-res $(KVMLIB)
|
||||||
|
|
||||||
|
CPPFLAGS = -DVERSION=\"$(VERSION)\" -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_C_SOURCE=200809L -DXINERAMA
|
||||||
|
CFLAGS = -std=c99 -pedantic -Wall -Wno-deprecated-declarations -Os $(INCS) $(CPPFLAGS)
|
||||||
|
LDFLAGS = $(LIBS)
|
||||||
|
|
||||||
SRC = \
|
SRC = \
|
||||||
src/atoms.c \
|
src/atoms.c \
|
||||||
|
@ -56,6 +65,9 @@ ${OBJ}: config.mk ${HDR}
|
||||||
clean:
|
clean:
|
||||||
rm -f polytreewm ${OBJ}
|
rm -f polytreewm ${OBJ}
|
||||||
|
|
||||||
|
distclean: clean
|
||||||
|
rm -f config/active.mk
|
||||||
|
|
||||||
install: all
|
install: all
|
||||||
mkdir -p ${DESTDIR}${PREFIX}/bin
|
mkdir -p ${DESTDIR}${PREFIX}/bin
|
||||||
cp -f polytreewm ${DESTDIR}${PREFIX}/bin
|
cp -f polytreewm ${DESTDIR}${PREFIX}/bin
|
||||||
|
@ -70,4 +82,4 @@ uninstall:
|
||||||
${DESTDIR}${PREFIX}/bin/polytreewm \
|
${DESTDIR}${PREFIX}/bin/polytreewm \
|
||||||
${DESTDIR}${MANPREFIX}/man1/polytreewm.1
|
${DESTDIR}${MANPREFIX}/man1/polytreewm.1
|
||||||
|
|
||||||
.PHONY: all options clean install uninstall
|
.PHONY: all options clean distclean install uninstall
|
||||||
|
|
44
config.mk
44
config.mk
|
@ -1,44 +0,0 @@
|
||||||
# PolytreeWM version
|
|
||||||
VERSION = 6.2
|
|
||||||
|
|
||||||
# Customize below to fit your system
|
|
||||||
|
|
||||||
# paths
|
|
||||||
PREFIX = /usr/local
|
|
||||||
MANPREFIX = ${PREFIX}/share/man
|
|
||||||
|
|
||||||
X11INC = /usr/X11R6/include
|
|
||||||
X11LIB = /usr/X11R6/lib
|
|
||||||
# FreeBSD (uncomment)
|
|
||||||
#X11INC = /usr/local/include
|
|
||||||
#X11LIB = /usr/local/lib
|
|
||||||
|
|
||||||
# Xinerama, comment if you don't want it
|
|
||||||
XINERAMALIBS = -lXinerama
|
|
||||||
XINERAMAFLAGS = -DXINERAMA
|
|
||||||
|
|
||||||
# freetype
|
|
||||||
FREETYPELIBS = -lfontconfig -lXft
|
|
||||||
FREETYPEINC = /usr/include/freetype2
|
|
||||||
# FreeBSD (uncomment)
|
|
||||||
#FREETYPEINC = /usr/local/include/freetype2
|
|
||||||
# OpenBSD (uncomment)
|
|
||||||
#FREETYPEINC = ${X11INC}/freetype2
|
|
||||||
#KVMLIB = -lkvm
|
|
||||||
|
|
||||||
# includes and libs
|
|
||||||
INCS = -I${X11INC} -I${FREETYPEINC}
|
|
||||||
LIBS = -L${X11LIB} -lX11 ${XINERAMALIBS} ${FREETYPELIBS} -lX11-xcb -lxcb -lxcb-res ${KVMLIB}
|
|
||||||
|
|
||||||
# flags
|
|
||||||
CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_C_SOURCE=200809L -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
|
|
24
config/default.mk
Normal file
24
config/default.mk
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
##########################
|
||||||
|
# Compiler, linker, etc. #
|
||||||
|
##########################
|
||||||
|
|
||||||
|
CC = cc
|
||||||
|
|
||||||
|
#########
|
||||||
|
# Paths #
|
||||||
|
#########
|
||||||
|
|
||||||
|
PREFIX = /usr/local
|
||||||
|
MANPREFIX = $(PREFIX)/share/man
|
||||||
|
|
||||||
|
################
|
||||||
|
# Dependencies #
|
||||||
|
################
|
||||||
|
|
||||||
|
X11INC = /usr/X11R6/include
|
||||||
|
X11LIB = /usr/X11R6/lib
|
||||||
|
|
||||||
|
XINERAMALIBS = -lXinerama
|
||||||
|
|
||||||
|
FREETYPELIBS = -lfontconfig -lXft
|
||||||
|
FREETYPEINC = /usr/include/freetype2
|
6
config/freebsd.mk
Normal file
6
config/freebsd.mk
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
include default.mk
|
||||||
|
|
||||||
|
X11INC = /usr/local/include
|
||||||
|
X11LIB = /usr/local/lib
|
||||||
|
|
||||||
|
FREETYPEINC = /usr/include/freetype2
|
5
config/openbsd.mk
Normal file
5
config/openbsd.mk
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
include default.mk
|
||||||
|
|
||||||
|
FREETYPEINC = $(X11INC)/freetype2
|
||||||
|
|
||||||
|
KVMLIB = -lkvm
|
5
configure
vendored
Executable file
5
configure
vendored
Executable file
|
@ -0,0 +1,5 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
ln -sf default.mk config/active.mk
|
Loading…
Reference in a new issue