From ca04e38d8300896b1666f7a1ff9abc65fd51b291 Mon Sep 17 00:00:00 2001 From: William McBrine Date: Mon, 7 Jan 2019 20:30:06 -0500 Subject: [PATCH] Apply SDL includes/libraries only as needed. --- sdl2/Makefile | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/sdl2/Makefile b/sdl2/Makefile index 0d59efa6..dd56174c 100644 --- a/sdl2/Makefile +++ b/sdl2/Makefile @@ -41,7 +41,8 @@ else endif ifeq ($(WIDE),Y) - CFLAGS += -DPDC_WIDE $(TFLAGS) + CFLAGS += -DPDC_WIDE + SFLAGS += $(TFLAGS) SLIBS += $(TLIBS) endif @@ -56,18 +57,19 @@ ifeq ($(DLL),Y) LIBCURSES = pdcurses.dll CLEAN = $(LIBCURSES) *.a RESOURCE = pdcurses.o - LIBLIBS = $(SLIBS) + LIBLIBS = $(SLIBS) + LDFLAGS = $(LIBCURSES) else LIBEXE = $(AR) LIBFLAGS = rcv LIBCURSES = pdcurses.a + LDFLAGS = $(LIBCURSES) $(SLIBS) CLEAN = *.a endif BUILD = $(CC) $(CFLAGS) -I$(PDCURSES_SRCDIR) LINK = $(CC) -LDFLAGS = $(LIBCURSES) $(SLIBS) DEMOS += sdltest$(E) @@ -98,7 +100,7 @@ tui.o tuidemo.o : $(PDCURSES_CURSES_H) panel.o ptest$(E): $(PANEL_HEADER) $(LIBOBJS) : %.o: $(srcdir)/%.c - $(BUILD) $(SFLAGS) -c $< + $(BUILD) -c $< $(PDCOBJS) : %.o: $(osdir)/%.c $(BUILD) $(SFLAGS) -c $< @@ -128,7 +130,7 @@ xmas$(E): $(demodir)/xmas.c $(BUILD) $(DEMOFLAGS) -o $@ $< $(LDFLAGS) sdltest$(E): $(osdir)/sdltest.c - $(BUILD) $(SFLAGS) $(DEMOFLAGS) -o $@ $< $(LDFLAGS) + $(BUILD) $(SFLAGS) $(DEMOFLAGS) -o $@ $< $(LIBCURSES) $(SLIBS) tui.o: $(demodir)/tui.c $(demodir)/tui.h $(BUILD) -c $(DEMOFLAGS) $(demodir)/tui.c