You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
902B

  1. PACKAGES = braids/test stmlib/utils braids
  2. VPATH = $(PACKAGES)
  3. TARGET = braids_test
  4. BUILD_ROOT = build/
  5. BUILD_DIR = $(BUILD_ROOT)$(TARGET)/
  6. CC_FILES = analog_oscillator.cc \
  7. digital_oscillator.cc \
  8. macro_oscillator.cc \
  9. braids_test.cc \
  10. quantizer.cc \
  11. resources.cc \
  12. random.cc
  13. OBJ_FILES = $(CC_FILES:.cc=.o)
  14. OBJS = $(patsubst %,$(BUILD_DIR)%,$(OBJ_FILES)) $(STARTUP_OBJ)
  15. DEPS = $(OBJS:.o=.d)
  16. DEP_FILE = $(BUILD_DIR)depends.mk
  17. all: braids_test
  18. $(BUILD_DIR):
  19. mkdir -p $(BUILD_DIR)
  20. $(BUILD_DIR)%.o: %.cc
  21. g++ -c -DTEST -g -Wall -Werror -Wno-unused-variable -I. $< -o $@
  22. $(BUILD_DIR)%.d: %.cc
  23. g++ -MM -DTEST -I. $< -MF $@ -MT $(@:.d=.o)
  24. braids_test: $(OBJS)
  25. g++ -o $(TARGET) $(OBJS)
  26. depends: $(DEPS)
  27. cat $(DEPS) > $(DEP_FILE)
  28. $(DEP_FILE): $(BUILD_DIR) $(DEPS)
  29. cat $(DEPS) > $(DEP_FILE)
  30. include $(DEP_FILE)