Highlight things
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 line
579B

  1. include config.mk
  2. include chad.mk
  3. SRC.dir:=source
  4. OBJ.dir:=object
  5. SRC:=$(shell find ${SRC.dir} -iname '*.c')
  6. HDR:=$(shell find ${SRC.dir} -iname '*.h')
  7. OBJ:=$(subst $(SRC.dir),$(OBJ.dir),$(SRC:.c=.o))
  8. VPATH=${SRC.dir} ${OBJ.dir}
  9. ${OBJ.dir}/%.o: ${SRC.dir}/%.c
  10. ${COMPILE.c} $< -o $@
  11. ${TARGET}: ${HDR} | ${OBJ}
  12. ${LINK.c} $| -o $@
  13. ${SRC} ${HDR}:
  14. install: ${PREFIX}
  15. install -v -g ${USER} -o ${USER} -m 744 ${TARGET} ${PREFIX}/bin/
  16. uninstall:
  17. -rm ${PREFIX}/bin/${TARGET}
  18. clean:
  19. -rm ${OBJ} ${TARGET}
  20. test: chad_test
  21. .PHONY: test clean install
  22. .DEFAULT_GOAL:=${TARGET}