Makefile 735 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. # tibasicc - a compiler for TI-BASIC code
  2. # See LICENSE file for copyright and license details. PROJDIRS := src
  3. VERSION = 0.1
  4. # paths
  5. PREFIX = /usr/local/
  6. SRCFILES := $(shell find $(PROJDIRS) -type f -name "*.cpp")
  7. OBJFILES := $(patsubst %.cpp,%.o,$(SRCFILES))
  8. DEPFILES := $(patsubst %.cpp,%.d,$(SRCFILES))
  9. .PHONY: all clean
  10. CXXFLAGS := -g -Wall -pedantic -Werror
  11. CXX := g++
  12. all: tibasicc
  13. tibasicc: $(OBJFILES)
  14. g++ -o tibasicc $(OBJFILES)
  15. -include $(DEPFILES)
  16. %.o: %.c
  17. @$(CXX) $(CFLAGS) -MMD -MP -c $< -o $@
  18. clean:
  19. rm -f $(OBJFILES)/*.o
  20. install: all
  21. mkdir -p ${PREFIX}/bin
  22. cp -f tibasicc ${PREFIX}/bin
  23. chmod 755 ${PREFIX}/bin/tibasicc
  24. uninstall:
  25. rm -f ${PREFIX}/bin/tibasicc
  26. .PHONY: all clean install uninstall