Makefile: Honor environment LDFLAGS
This commit is contained in:
parent
2c466ad1b1
commit
63e4eb5d6f
4
makefile
4
makefile
|
@ -23,7 +23,7 @@ CXXFLAGS += `sdl2-config --cflags` -DVERSION=$(VERSION) -DREVISION=$(REVISION) -
|
||||||
CXXFLAGS += -Wall -Wempty-body -ansi -pedantic -Werror -Wstrict-prototypes -Werror=maybe-uninitialized -Warray-bounds
|
CXXFLAGS += -Wall -Wempty-body -ansi -pedantic -Werror -Wstrict-prototypes -Werror=maybe-uninitialized -Warray-bounds
|
||||||
CXXFLAGS += -g -lefence
|
CXXFLAGS += -g -lefence
|
||||||
|
|
||||||
LFLAGS := `sdl2-config --libs` -lSDL2_mixer -lSDL2_image -lSDL2_ttf -lm
|
LDFLAGS += `sdl2-config --libs` -lSDL2_mixer -lSDL2_image -lSDL2_ttf -lm
|
||||||
|
|
||||||
SHARED_FILES = CHANGELOG LICENSE README.md data gfx manual music sound icons
|
SHARED_FILES = CHANGELOG LICENSE README.md data gfx manual music sound icons
|
||||||
DIST_FILES = $(SHARED_FILES) locale tbftss
|
DIST_FILES = $(SHARED_FILES) locale tbftss
|
||||||
|
@ -31,7 +31,7 @@ SRC_DIST_FILES = $(SHARED_FILES) src makefile* common.mk
|
||||||
|
|
||||||
# linking the program.
|
# linking the program.
|
||||||
$(PROG): $(OBJS)
|
$(PROG): $(OBJS)
|
||||||
$(CC) -o $@ $(OBJS) $(LFLAGS)
|
$(CC) -o $@ $(OBJS) $(LDFLAGS)
|
||||||
|
|
||||||
install:
|
install:
|
||||||
mkdir -p $(INST_BIN_DIR)
|
mkdir -p $(INST_BIN_DIR)
|
||||||
|
|
|
@ -13,13 +13,13 @@ CXXFLAGS += `sdl2-config --cflags` -DVERSION=$(VERSION) -DREVISION=$(REVISION) -
|
||||||
CXXFLAGS += -ansi -Wstrict-prototypes
|
CXXFLAGS += -ansi -Wstrict-prototypes
|
||||||
CXXFLAGS += -g -lefence -flto -flto-odr-type-merging
|
CXXFLAGS += -g -lefence -flto -flto-odr-type-merging
|
||||||
|
|
||||||
LFLAGS := `sdl2-config --libs` -lSDL2_mixer -lSDL2_image -lSDL2_ttf -lm
|
LDFLAGS += `sdl2-config --libs` -lSDL2_mixer -lSDL2_image -lSDL2_ttf -lm
|
||||||
|
|
||||||
DIST_FILES = data gfx manual music sound src LICENSE makefile* common.mk README.md CHANGELOG
|
DIST_FILES = data gfx manual music sound src LICENSE makefile* common.mk README.md CHANGELOG
|
||||||
|
|
||||||
# linking the program.
|
# linking the program.
|
||||||
$(PROG): $(OBJS)
|
$(PROG): $(OBJS)
|
||||||
$(CC) -o $@ $(OBJS) $(LFLAGS)
|
$(CC) -o $@ $(OBJS) $(LDFLAGS)
|
||||||
|
|
||||||
install:
|
install:
|
||||||
cp $(PROG) $(BIN_DIR)
|
cp $(PROG) $(BIN_DIR)
|
||||||
|
|
|
@ -10,10 +10,10 @@ OBJS += win32Init.o
|
||||||
CXXFLAGS += `$(SDLC) --cflags` -DVERSION=$(VERSION) -DREVISION=$(REVISION) -DDATA_DIR=\"$(DATA_DIR)\" -DLOCALE_DIR=\"$(LOCALE_DIR)\"
|
CXXFLAGS += `$(SDLC) --cflags` -DVERSION=$(VERSION) -DREVISION=$(REVISION) -DDATA_DIR=\"$(DATA_DIR)\" -DLOCALE_DIR=\"$(LOCALE_DIR)\"
|
||||||
CXXFLAGS += -ansi
|
CXXFLAGS += -ansi
|
||||||
|
|
||||||
LFLAGS = `$(SDLC) --libs` -lm -lSDL2_mixer -lSDL2_image -lSDL2_ttf -lSDL2main
|
LDFLAGS += `$(SDLC) --libs` -lm -lSDL2_mixer -lSDL2_image -lSDL2_ttf -lSDL2main
|
||||||
|
|
||||||
include common.mk
|
include common.mk
|
||||||
|
|
||||||
# linking the program.
|
# linking the program.
|
||||||
$(PROG): $(OBJS)
|
$(PROG): $(OBJS)
|
||||||
$(CC) -o $@ $(OBJS) $(LFLAGS) -L$(LIBPATH)
|
$(CC) -o $@ $(OBJS) $(LDFLAGS) -L$(LIBPATH)
|
||||||
|
|
Loading…
Reference in New Issue