Makefile 735 B

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