commit d326d8d02ec116bf126e631dbf8dccd3427b18f4 parent d96a5f1e45dd7e803ff5cd2f0020b85efa18089c Author: Michael Savage <mikejsavage@gmail.com> Date: Sun Apr 23 00:34:08 +0300 Simplify Makefile with BIN_COMMON_OBJS Diffstat:
Makefile | | | 13 | +++++++------ |
rules.mk | | | 2 | +- |
diff --git a/Makefile b/Makefile @@ -6,11 +6,11 @@ VISITORS := visitors/linear_algebra.h all: $(VISITORS) $(BINS) $(MODULES) test_lockfree # Binary dependencies -medfall: main.o gl.o log.o strlcpy.o memory_arena.o renderer.o immediate.o work_queue.o text_renderer.o stb_truetype.o glad.o libglfw.a -pp: pp.o log.o memory_arena.o stb_image.o lz4.o lz4hc.o strlcpy.o heightmap.o -sound: audio.o mixer.o log.o strlcpy.o memory_arena.o wave.o platform_audio_output.o -srv: server/main.o log.o profiler.o stats.o strlcpy.o rng/well512.o -launcher/launcher: launcher/main.o memory_arena.o log.o http.o work_queue.o sha2.o strlcpy.o gl.o glad.o libimgui.a stb_truetype.o libglfw.a +medfall: main.o gl.o renderer.o immediate.o work_queue.o text_renderer.o stb_truetype.o glad.o libglfw.a libsquish.a +pp: pp.o stb_image.o lz4.o lz4hc.o heightmap.o libsquish.a +sound: audio.o mixer.o wave.o platform_audio_output.o +srv: server/main.o +launcher/launcher: launcher/main.o memory_arena.o http.o work_queue.o sha2.o gl.o glad.o libimgui.a stb_truetype.o libglfw.a libmonocypher.a test_lockfree: relacy.cc $(CXX) relacy.cc -o test_lockfree $(CXXFLAGS) $(LDFLAGS) -std=c++98 -fexceptions -frtti -Wno-missing-field-initializers @@ -31,7 +31,8 @@ xxhash.o: CXXFLAGS += -O3 visitors/linear_algebra.h: linear_algebra.h # Common dependencies -COMMON_OBJS := log.o memory_arena.o work_queue.o immediate.o profiler.o text_renderer.o stb_truetype.o renderer.o strlcpy.o stats.o rng/well512.o +BIN_COMMON_OBJS := log.o memory_arena.o ggformat.o strlcpy.o strlcat.o strtonum.o profiler.o stats.o rng/well512.o +DLL_COMMON_OBJS := log.o memory_arena.o work_queue.o immediate.o profiler.o text_renderer.o stb_truetype.o renderer.o ggformat.o strlcat.o strlcpy.o strtonum.o stats.o rng/well512.o libsquish.a # Compiler flags WARNINGS := -Wall -Wextra -Wno-unused-parameter -Wno-unused-function -Wconversion -Wshadow -Wcast-align -Wstrict-overflow -Werror=switch diff --git a/rules.mk b/rules.mk @@ -1,7 +1,7 @@ # This file contains Makefile rules to actually build things # Create the binaries -$(BINS): %: +$(BINS): %: $(BIN_COMMON_OBJS) @printf "\e[1;31mbuilding $@\e[0m\n" @$(CXX) -o $@ $^ $(LDFLAGS)