Makefile 375 B

1234567891011121314151617181920
  1. PROJDIRS := src
  2. SRCFILES := $(shell find $(PROJDIRS) -type f -name "*.cpp")
  3. OBJFILES := $(patsubst %.cpp,%.o,$(SRCFILES))
  4. DEPFILES := $(patsubst %.cpp,%.d,$(SRCFILES))
  5. .PHONY: all clean
  6. CXXFLAGS := -g -Wall -pedantic -Werror
  7. CXX := g++
  8. all: tibasic
  9. tibasic: $(OBJFILES)
  10. g++ -o tibasic $(OBJFILES)
  11. -include $(DEPFILES)
  12. %.o: %.c
  13. @$(CXX) $(CFLAGS) -MMD -MP -c $< -o $@