Xinqi Bao's Git
projects
/
slstatus.git
/ commitdiff
summary
|
log
|
commit
|
diff
|
tree
raw
|
patch
|
inline
| side by side (from parent 1:
085431b
)
Makefile: separate default flags from user flags
author
Quentin Rameau <
[email protected]
>
Mon, 30 Apr 2018 14:11:45 +0000
(16:11 +0200)
committer
Aaron Marcher <
[email protected]
>
Mon, 30 Apr 2018 14:27:07 +0000
(16:27 +0200)
Makefile
patch
|
blob
|
history
config.mk
patch
|
blob
|
history
diff --git
a/Makefile
b/Makefile
index
7d80893
..
a2c49c8
100644
(file)
--- a/
Makefile
+++ b/
Makefile
@@
-27,6
+27,10
@@
COM =\
components/volume\
components/$(OS)/wifi
components/volume\
components/$(OS)/wifi
+SLSCFLAGS = -I$(X11INC) -D_DEFAULT_SOURCE $(CFLAGS)
+SLSLDFLAGS = -L$(X11LIB) $(LDFLAGS)
+SLSLIBS = -lX11 $(OSSLIBS) $(LIBS)
+
all: slstatus
slstatus: slstatus.o $(COM:=.o) $(REQ:=.o)
all: slstatus
slstatus: slstatus.o $(COM:=.o) $(REQ:=.o)
@@
-37,10
+41,10
@@
config.h:
cp config.def.h $@
.o:
cp config.def.h $@
.o:
- $(CC) -o $@ $(
LDFLAGS) $< $(COM:=.o) $(REQ:=.o) $(LD
LIBS)
+ $(CC) -o $@ $(
SLSLDFLAGS) $< $(COM:=.o) $(REQ:=.o) $(SLS
LIBS)
.c.o:
.c.o:
- $(CC) -o $@ -c $(
CPPFLAGS) $(
CFLAGS) $<
+ $(CC) -o $@ -c $(
SLS
CFLAGS) $<
clean:
rm -f slstatus slstatus.o $(COM:=.o) $(REQ:=.o)
clean:
rm -f slstatus slstatus.o $(COM:=.o) $(REQ:=.o)
diff --git
a/config.mk
b/config.mk
index
a148da4
..
bb2324f
100644
(file)
--- a/
config.mk
+++ b/
config.mk
@@
-4,7
+4,7
@@
VERSION = 0
# customize below to fit your system
# paths
# customize below to fit your system
# paths
-PREFIX = /usr/local
+PREFIX
= /usr/local
MANPREFIX = ${PREFIX}/share/man
X11INC = /usr/X11R6/include
MANPREFIX = ${PREFIX}/share/man
X11INC = /usr/X11R6/include
@@
-14,10
+14,6
@@
X11LIB = /usr/X11R6/lib
#OSSLIBS = -lossaudio
# flags
#OSSLIBS = -lossaudio
# flags
-CPPFLAGS = -I$(X11INC) -D_DEFAULT_SOURCE
CFLAGS = -std=c99 -pedantic -Wall -Wextra -Os
CFLAGS = -std=c99 -pedantic -Wall -Wextra -Os
-LDFLAGS = -L$(X11LIB) -s
-LDLIBS = -lX11 ${OSSLIBS}
-
-# compiler and linker
-CC = cc
+LDFLAGS = -s
+LIBS =