Makefile 291 B

123456789101112131415161718
  1. PREF_SRC = ./src/
  2. PREF_OBJ = ./obj/
  3. CC = g++
  4. SRC = $(wildcard $(PREF_SRC)*.cpp)
  5. OBJ = $(patsubst $(PREF_SRC)%.c, $(PREF_OBJ)%.o, $(SRC))
  6. PREF_BIN = ./bin/
  7. TARGET = game
  8. LIBS = -lX11
  9. all: $(TARGET)
  10. $(TARGET): $(OBJ)
  11. $(CC) $(OBJ) $(LIBS) -o $(PREF_BIN)$(TARGET)
  12. clear:
  13. rm $(PREF_OBJ)*.o