aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQuentin Rameau <quinq@fifth.space>2017-07-12 00:26:35 +0200
committerQuentin Rameau <quinq@fifth.space>2017-07-12 00:28:11 +0200
commitd4928edba0fe2cc63b3bc13fd6dad0bcb875174e (patch)
treeb8588187f92b1920e5b1efa155dd441058418a3d
parentfabd4602b3223666165c76c397644a081b9a97e5 (diff)
downloadst-d4928edba0fe2cc63b3bc13fd6dad0bcb875174e.tar.gz
st-d4928edba0fe2cc63b3bc13fd6dad0bcb875174e.zip
Let the user specify C and LD FLAGS
-rw-r--r--Makefile8
-rw-r--r--config.mk4
2 files changed, 6 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index f5b84a0..128ee9d 100644
--- a/Makefile
+++ b/Makefile
@@ -11,15 +11,15 @@ all: options st
11 11
12options: 12options:
13 @echo st build options: 13 @echo st build options:
14 @echo "CFLAGS = $(CFLAGS)" 14 @echo "CFLAGS = $(STCFLAGS)"
15 @echo "LDFLAGS = $(LDFLAGS)" 15 @echo "LDFLAGS = $(STLDFLAGS)"
16 @echo "CC = $(CC)" 16 @echo "CC = $(CC)"
17 17
18config.h: 18config.h:
19 cp config.def.h config.h 19 cp config.def.h config.h
20 20
21.c.o: 21.c.o:
22 $(CC) $(CFLAGS) -c $< 22 $(CC) $(STCFLAGS) -c $<
23 23
24st.o: config.h st.h win.h 24st.o: config.h st.h win.h
25x.o: arg.h st.h win.h 25x.o: arg.h st.h win.h
@@ -27,7 +27,7 @@ x.o: arg.h st.h win.h
27$(OBJ): config.h config.mk 27$(OBJ): config.h config.mk
28 28
29st: $(OBJ) 29st: $(OBJ)
30 $(CC) $(LDFLAGS) -o $@ $(OBJ) 30 $(CC) $(STLDFLAGS) -o $@ $(OBJ)
31 31
32clean: 32clean:
33 rm -f st $(OBJ) st-$(VERSION).tar.gz 33 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
@@ -20,8 +20,8 @@ LIBS = -L$(X11LIB) -lm -lrt -lX11 -lutil -lXft \
20 20
21# flags 21# flags
22CPPFLAGS = -DVERSION=\"$(VERSION)\" -D_XOPEN_SOURCE=600 22CPPFLAGS = -DVERSION=\"$(VERSION)\" -D_XOPEN_SOURCE=600
23CFLAGS = -g -std=c99 -pedantic -Wall -Wvariadic-macros -Os $(INCS) $(CPPFLAGS) 23STCFLAGS = $(INCS) $(CPPFLAGS) $(CFLAGS)
24LDFLAGS = -g $(LIBS) 24STLDFLAGS = $(LIBS) $(LDFLAGS)
25 25
26# compiler and linker 26# compiler and linker
27# CC = c99 27# CC = c99