makefile 356B

12345678910111213141516171819
  1. CC=g++
  2. CFLAGS=-O2 -g
  3. LDFLAGS=-lX11 -lXext
  4. SOURCES=main.cpp x.cpp options.cpp
  5. OBJECTS=$(SOURCES:.cpp=.o)
  6. EXECUTABLE=slop
  7. BINDIR="usr/bin"
  8. all: $(SOURCES) $(EXECUTABLE)
  9. $(EXECUTABLE): $(OBJECTS)
  10. $(CC) $(LDFLAGS) $(OBJECTS) -o $@
  11. clean:
  12. rm -rf $(OBJECTS) $(EXECUTABLE)
  13. install: all
  14. mkdir -p $(DESTDIR)/$(BINDIR)
  15. cp $(CURDIR)/slop $(DESTDIR)/$(BINDIR)