Makefile: separate default flags from user flags
This commit is contained in:
parent
085431b282
commit
95665e437b
2 changed files with 9 additions and 9 deletions
8
Makefile
8
Makefile
|
@ -27,6 +27,10 @@ COM =\
|
|||
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)
|
||||
|
@ -37,10 +41,10 @@ config.h:
|
|||
cp config.def.h $@
|
||||
|
||||
.o:
|
||||
$(CC) -o $@ $(LDFLAGS) $< $(COM:=.o) $(REQ:=.o) $(LDLIBS)
|
||||
$(CC) -o $@ $(SLSLDFLAGS) $< $(COM:=.o) $(REQ:=.o) $(SLSLIBS)
|
||||
|
||||
.c.o:
|
||||
$(CC) -o $@ -c $(CPPFLAGS) $(CFLAGS) $<
|
||||
$(CC) -o $@ -c $(SLSCFLAGS) $<
|
||||
|
||||
clean:
|
||||
rm -f slstatus slstatus.o $(COM:=.o) $(REQ:=.o)
|
||||
|
|
|
@ -14,10 +14,6 @@ X11LIB = /usr/X11R6/lib
|
|||
#OSSLIBS = -lossaudio
|
||||
|
||||
# flags
|
||||
CPPFLAGS = -I$(X11INC) -D_DEFAULT_SOURCE
|
||||
CFLAGS = -std=c99 -pedantic -Wall -Wextra -Os
|
||||
LDFLAGS = -L$(X11LIB) -s
|
||||
LDLIBS = -lX11 ${OSSLIBS}
|
||||
|
||||
# compiler and linker
|
||||
CC = cc
|
||||
LDFLAGS = -s
|
||||
LIBS =
|
||||
|
|
Loading…
Reference in a new issue