[hackers] [st] Let the user specify C and LD FLAGS || Quentin Rameau

From: <git_AT_suckless.org>
Date: Wed, 12 Jul 2017 15:52:16 +0200 (CEST)

commit d4928edba0fe2cc63b3bc13fd6dad0bcb875174e
Author: Quentin Rameau <quinq_AT_fifth.space>
AuthorDate: Wed Jul 12 00:26:35 2017 +0200
Commit: Quentin Rameau <quinq_AT_fifth.space>
CommitDate: Wed Jul 12 00:28:11 2017 +0200

    Let the user specify C and LD FLAGS

diff --git a/Makefile b/Makefile
index f5b84a0..128ee9d 100644
--- a/Makefile
+++ b/Makefile
_AT_@ -11,15 +11,15 @@ all: options st
 
 options:
         _AT_echo st build options:
- _AT_echo "CFLAGS = $(CFLAGS)"
- _AT_echo "LDFLAGS = $(LDFLAGS)"
+ _AT_echo "CFLAGS = $(STCFLAGS)"
+ _AT_echo "LDFLAGS = $(STLDFLAGS)"
         _AT_echo "CC = $(CC)"
 
 config.h:
         cp config.def.h config.h
 
 .c.o:
- $(CC) $(CFLAGS) -c $<
+ $(CC) $(STCFLAGS) -c $<
 
 st.o: config.h st.h win.h
 x.o: arg.h st.h win.h
_AT_@ -27,7 +27,7 @@ x.o: arg.h st.h win.h
 $(OBJ): config.h config.mk
 
 st: $(OBJ)
- $(CC) $(LDFLAGS) -o $_AT_ $(OBJ)
+ $(CC) $(STLDFLAGS) -o $_AT_ $(OBJ)
 
 clean:
         rm -f st $(OBJ) st-$(VERSION).tar.gz
diff --git a/config.mk b/config.mk
index 527a64d..0aceec4 100644
--- a/config.mk
+++ b/config.mk
_AT_@ -20,8 +20,8 @@ LIBS = -L$(X11LIB) -lm -lrt -lX11 -lutil -lXft \
 
 # flags
 CPPFLAGS = -DVERSION=\"$(VERSION)\" -D_XOPEN_SOURCE=600
-CFLAGS = -g -std=c99 -pedantic -Wall -Wvariadic-macros -Os $(INCS) $(CPPFLAGS)
-LDFLAGS = -g $(LIBS)
+STCFLAGS = $(INCS) $(CPPFLAGS) $(CFLAGS)
+STLDFLAGS = $(LIBS) $(LDFLAGS)
 
 # compiler and linker
 # CC = c99
Received on Wed Jul 12 2017 - 15:52:16 CEST

This archive was generated by hypermail 2.3.0 : Wed Jul 12 2017 - 16:00:38 CEST