medfall

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit cc35c8e6a911575304345953f7267b6870e3d50c
parent f28cc747452bff742306cd9e53d27249fbd0838e
Author: Michael Savage <mikejsavage@gmail.com>
Date:   Sat Jan 30 14:34:11 +0000

Neaten up STBS in Makefile

Diffstat:
Makefile | 10+++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/Makefile b/Makefile @@ -1,6 +1,6 @@ BINS := medfall pp sound MODULES := bsp.so btt.so hm.so sm.so audio.so -STBS := stb_truetype stb_image stb_image_write stb_perlin +STBS := truetype image image_write perlin all: $(BINS) $(STB_OBJS) $(MODULES) @@ -25,8 +25,8 @@ CXXFLAGS += -std=c++11 -O2 \ -msse2 -ggdb3 -fno-omit-frame-pointer $(WARNINGS) -DGL_GLEXT_PROTOTYPES -DGLFW_INCLUDE_NONE -ffreestanding -fno-exceptions LDFLAGS += -lm -pthread -# The STB libraries need you to define STB_*_IMPLEMENTATION to get the actual code -STB_CXXFLAGS := -DSTB_IMAGE_IMPLEMENTATION -DSTB_IMAGE_WRITE_IMPLEMENTATION -DSTB_PERLIN_IMPLEMENTATION -DSTB_TRUETYPE_IMPLEMENTATION +# The STB libraries need you to pass -DSTB_*_IMPLEMENTATION to get the actual code +STB_CXXFLAGS := $(shell echo $(addprefix -DSTB_,$(addsuffix _IMPLEMENTATION,$(STBS))) | tr a-z A-Z) # OS detection ifneq ($(shell uname -s),Darwin) @@ -41,8 +41,8 @@ $(BINS): %: $(CXX) -o $@ $^ $(LDFLAGS) # Create stb_*.cc and then stb_*.o -STB_OBJS := $(addsuffix .o,$(STBS)) -STB_CCS := $(addsuffix .cc,$(STBS)) +STB_OBJS := $(addprefix stb_,$(addsuffix .o,$(STBS))) +STB_CCS := $(addprefix stb_,$(addsuffix .cc,$(STBS))) $(STB_CCS): %.cc: %.h cp $^ $*.cc