1PACKAGES = peaks/test stmlib/utils peaks peaks/drums peaks/pulse_processor peaks/modulations peaks/number_station 2 3VPATH = $(PACKAGES) 4 5TARGET = peaks_test 6BUILD_ROOT = build/ 7BUILD_DIR = $(BUILD_ROOT)$(TARGET)/ 8CC_FILES = bass_drum.cc \ 9 fm_drum.cc \ 10 high_hat.cc \ 11 lfo.cc \ 12 multistage_envelope.cc \ 13 number_station.cc \ 14 peaks_test.cc \ 15 processors.cc \ 16 pulse_shaper.cc \ 17 pulse_randomizer.cc \ 18 random.cc \ 19 resources.cc \ 20 snare_drum.cc \ 21 svf.cc 22OBJ_FILES = $(CC_FILES:.cc=.o) 23OBJS = $(patsubst %,$(BUILD_DIR)%,$(OBJ_FILES)) $(STARTUP_OBJ) 24DEPS = $(OBJS:.o=.d) 25DEP_FILE = $(BUILD_DIR)depends.mk 26 27all: peaks_test 28 29$(BUILD_DIR): 30 mkdir -p $(BUILD_DIR) 31 32$(BUILD_DIR)%.o: %.cc 33 g++ -c -DTEST -g -Wall -Werror -I. $< -o $@ 34 35$(BUILD_DIR)%.d: %.cc 36 g++ -MM -DTEST -I. $< -MF $@ -MT $(@:.d=.o) 37 38peaks_test: $(OBJS) 39 g++ -o $(TARGET) $(OBJS) 40 41depends: $(DEPS) 42 cat $(DEPS) > $(DEP_FILE) 43 44$(DEP_FILE): $(BUILD_DIR) $(DEPS) 45 cat $(DEPS) > $(DEP_FILE) 46 47include $(DEP_FILE) 48