Tweak build system a little bit
authorLaslo Hunhold <dev@frign.de>
Tue, 1 May 2018 18:50:53 +0000 (20:50 +0200)
committerAaron Marcher <me@drkhsh.at>
Tue, 1 May 2018 18:53:27 +0000 (20:53 +0200)
Be consistent with brackets and add a comment for OpenBSD to make it
clearer what the actual intent of the uncommented line is.

In the Makefile, add a dependency of slstatus.o from config.mk.

Makefile
config.mk

index 00c35c4d61bb1ebcfa591d81b2aac1c2ce8868e9..b9d7695af719a68e395f352c9278725085d4f675 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -29,7 +29,7 @@ COM =\
 all: slstatus
 
 slstatus: slstatus.o $(COM:=.o) $(REQ:=.o)
-slstatus.o: slstatus.c slstatus.h arg.h config.h $(REQ:=.h)
+slstatus.o: slstatus.c slstatus.h arg.h config.h config.mk $(REQ:=.h)
 $(COM:=.o): config.mk $(REQ:=.h)
 
 config.h:
index a148da4716942d264382dfb72dda1713add0f753..9d26bc3ab9cfe5252a4b46314dc51951a76acaaa 100644 (file)
--- a/config.mk
+++ b/config.mk
@@ -5,19 +5,17 @@ VERSION = 0
 
 # paths
 PREFIX = /usr/local
-MANPREFIX = ${PREFIX}/share/man
+MANPREFIX = $(PREFIX)/share/man
 
 X11INC = /usr/X11R6/include
 X11LIB = /usr/X11R6/lib
 
-# OpenBSD (uncomment)
-#OSSLIBS = -lossaudio
-
 # flags
 CPPFLAGS = -I$(X11INC) -D_DEFAULT_SOURCE
 CFLAGS   = -std=c99 -pedantic -Wall -Wextra -Os
 LDFLAGS  = -L$(X11LIB) -s
-LDLIBS   = -lX11 ${OSSLIBS}
+# OpenBSD: add -lossaudio
+LDLIBS   = -lX11
 
 # compiler and linker
 CC = cc