Xinqi Bao's Git
projects
/
st.git
/ commitdiff
summary
|
log
|
commit
|
diff
|
tree
raw
|
patch
|
inline
| side by side (from parent 1:
fabd460
)
Let the user specify C and LD FLAGS
author
Quentin Rameau <
[email protected]
>
Tue, 11 Jul 2017 22:26:35 +0000
(
00:26
+0200)
committer
Quentin Rameau <
[email protected]
>
Tue, 11 Jul 2017 22:28:11 +0000
(
00:28
+0200)
Makefile
patch
|
blob
|
history
config.mk
patch
|
blob
|
history
diff --git
a/Makefile
b/Makefile
index
f5b84a0
..
128ee9d
100644
(file)
--- a/
Makefile
+++ b/
Makefile
@@
-11,15
+11,15
@@
all: options st
options:
@echo st build options:
options:
@echo st build options:
- @echo "CFLAGS = $(CFLAGS)"
- @echo "LDFLAGS = $(LDFLAGS)"
+ @echo "CFLAGS = $(
ST
CFLAGS)"
+ @echo "LDFLAGS = $(
ST
LDFLAGS)"
@echo "CC = $(CC)"
config.h:
cp config.def.h config.h
.c.o:
@echo "CC = $(CC)"
config.h:
cp config.def.h config.h
.c.o:
- $(CC) $(CFLAGS) -c $<
+ $(CC) $(
ST
CFLAGS) -c $<
st.o: config.h st.h win.h
x.o: arg.h st.h win.h
st.o: config.h st.h win.h
x.o: arg.h st.h win.h
@@
-27,7
+27,7
@@
x.o: arg.h st.h win.h
$(OBJ): config.h config.mk
st: $(OBJ)
$(OBJ): config.h config.mk
st: $(OBJ)
- $(CC) $(LDFLAGS) -o $@ $(OBJ)
+ $(CC) $(
ST
LDFLAGS) -o $@ $(OBJ)
clean:
rm -f st $(OBJ) st-$(VERSION).tar.gz
clean:
rm -f st $(OBJ) st-$(VERSION).tar.gz
diff --git
a/config.mk
b/config.mk
index
527a64d
..
0aceec4
100644
(file)
--- a/
config.mk
+++ b/
config.mk
@@
-20,8
+20,8
@@
LIBS = -L$(X11LIB) -lm -lrt -lX11 -lutil -lXft \
# flags
CPPFLAGS = -DVERSION=\"$(VERSION)\" -D_XOPEN_SOURCE=600
# flags
CPPFLAGS = -DVERSION=\"$(VERSION)\" -D_XOPEN_SOURCE=600
-
CFLAGS = -g -std=c99 -pedantic -Wall -Wvariadic-macros -Os $(INCS) $(CPP
FLAGS)
-
LDFLAGS = -g $(LIB
S)
+
STCFLAGS = $(INCS) $(CPPFLAGS) $(C
FLAGS)
+
STLDFLAGS = $(LIBS) $(LDFLAG
S)
# compiler and linker
# CC = c99
# compiler and linker
# CC = c99