mirror of
https://github.com/pikami/st.git
synced 2024-11-25 13:25:43 +00:00
Let the user specify C and LD FLAGS
This commit is contained in:
parent
fabd4602b3
commit
d4928edba0
8
Makefile
8
Makefile
@ -11,15 +11,15 @@ all: options st
|
|||||||
|
|
||||||
options:
|
options:
|
||||||
@echo st build options:
|
@echo st build options:
|
||||||
@echo "CFLAGS = $(CFLAGS)"
|
@echo "CFLAGS = $(STCFLAGS)"
|
||||||
@echo "LDFLAGS = $(LDFLAGS)"
|
@echo "LDFLAGS = $(STLDFLAGS)"
|
||||||
@echo "CC = $(CC)"
|
@echo "CC = $(CC)"
|
||||||
|
|
||||||
config.h:
|
config.h:
|
||||||
cp config.def.h config.h
|
cp config.def.h config.h
|
||||||
|
|
||||||
.c.o:
|
.c.o:
|
||||||
$(CC) $(CFLAGS) -c $<
|
$(CC) $(STCFLAGS) -c $<
|
||||||
|
|
||||||
st.o: config.h st.h win.h
|
st.o: config.h st.h win.h
|
||||||
x.o: arg.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
|
$(OBJ): config.h config.mk
|
||||||
|
|
||||||
st: $(OBJ)
|
st: $(OBJ)
|
||||||
$(CC) $(LDFLAGS) -o $@ $(OBJ)
|
$(CC) $(STLDFLAGS) -o $@ $(OBJ)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f st $(OBJ) st-$(VERSION).tar.gz
|
rm -f st $(OBJ) st-$(VERSION).tar.gz
|
||||||
|
@ -20,8 +20,8 @@ LIBS = -L$(X11LIB) -lm -lrt -lX11 -lutil -lXft \
|
|||||||
|
|
||||||
# flags
|
# flags
|
||||||
CPPFLAGS = -DVERSION=\"$(VERSION)\" -D_XOPEN_SOURCE=600
|
CPPFLAGS = -DVERSION=\"$(VERSION)\" -D_XOPEN_SOURCE=600
|
||||||
CFLAGS = -g -std=c99 -pedantic -Wall -Wvariadic-macros -Os $(INCS) $(CPPFLAGS)
|
STCFLAGS = $(INCS) $(CPPFLAGS) $(CFLAGS)
|
||||||
LDFLAGS = -g $(LIBS)
|
STLDFLAGS = $(LIBS) $(LDFLAGS)
|
||||||
|
|
||||||
# compiler and linker
|
# compiler and linker
|
||||||
# CC = c99
|
# CC = c99
|
||||||
|
Loading…
Reference in New Issue
Block a user