1234567891011121314151617181920212223
  1. CXX ?= g++
  2. CXXFLAGS ?= -O2 -g
  3. LDFLAGS += -lX11 -lXext -lrt
  4. SOURCES = main.cpp x.cpp options.cpp rectangle.cpp
  5. OBJECTS = $(SOURCES:.cpp=.o)
  6. EXECUTABLE = slop
  7. BINDIR = "/usr/bin"
  8. all: $(EXECUTABLE)
  9. $(EXECUTABLE): $(OBJECTS)
  10. $(CXX) $(OBJECTS) -o $@ $(LDFLAGS)
  11. clean:
  12. $(RM) $(OBJECTS)
  13. dist-clean: clean
  14. $(RM) $(EXECUTABLE)
  15. install: all
  16. mkdir -p $(DESTDIR)$(BINDIR)
  17. cp $(CURDIR)/$(EXECUTABLE) $(DESTDIR)$(BINDIR)