Makefile 354 B

12345678910111213141516171819202122
  1. TARGET = glmouselook
  2. CC = gcc
  3. CFLAGS =
  4. LIBS = -lX11 -lGL -lGLU -lm
  5. PREF_SRC = ./src/
  6. PREF_OBJ = ./obj/
  7. SRCS = $(wildcard $(PREF_SRC)*.c)
  8. OBJS = $(patsubst $(PREF_SRC)%.c, $(PREF_OBJ)%.o, $(SRCS))
  9. $(TARGET): $(OBJS)
  10. $(CC) $(OBJS) -o $(TARGET) $(LIBS)
  11. $(PREF_OBJ)%.o: $(PREF_SRC)%.c
  12. $(CC) $(CFLAGS) -c $< -o $@
  13. clean:
  14. rm $(TARGET) $(PREF_OBJ)*.o