Build tool
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.

Makefile 727B

123456789101112131415161718192021222324
  1. SRCS = \
  2. lib/BXParser.cc lib/build.cc lib/compdb.cc lib/CompileStep.cc lib/DepNode.cc \
  3. lib/globals.cc lib/LinkStep.cc lib/logger.cc lib/parallel.cc lib/sys.cc \
  4. lib/toolchain.cc cmd/main.cc
  5. HDRS = \
  6. lib/BXParser.h lib/build.h lib/compdb.h lib/CompileStep.h lib/DepNode.h \
  7. lib/globals.h lib/LinkStep.h lib/logger.h lib/parallel.h lib/sys.h \
  8. lib/toolchain.h lib/bufio.h
  9. BUILD = build
  10. OBJS = $(patsubst %,$(BUILD)/%.o,$(SRCS))
  11. CFLAGS = -std=c++14 -Wall -Wextra -Wpedantic -Wno-unused-parameter -Ilib -O3 -g
  12. LDLIBS = -lpthread
  13. $(BUILD)/%.cc.o: %.cc $(HDRS)
  14. @mkdir -p $(@D)
  15. $(CXX) $(CFLAGS) -o $@ -c $<
  16. $(BUILD)/box: $(OBJS)
  17. @mkdir -p $(@D)
  18. $(CXX) $(LDFLAGS) -o $@ $^ $(LDLIBS)
  19. .PHONY: clean
  20. clean:
  21. rm -rf $(BUILD)