Makefile 314 B

123456789101112131415161718192021222324
  1. .POSIX: ;
  2. include config.mk
  3. BINNAME = rl
  4. OBJS = src/main.o src/util.o
  5. all: bin/${BINNAME}
  6. .c.o:
  7. ${CC} ${CPPFLAGS} ${CFLAGS} -c $< -o $@
  8. bin/${BINNAME}: ${OBJS}
  9. mkdir -p bin/
  10. ${CC} ${LDFLAGS} ${CFLAGS} ${OBJS} -o $@
  11. clean:
  12. rm -f src/*.o
  13. rm -f bin/${BINNAME}
  14. fresh: clean all
  15. .PHONY: all clean fresh