makefile 830 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. # makefile for vblade
  2. # see README for others
  3. PLATFORM=linux
  4. prefix = /usr
  5. sbindir = ${prefix}/sbin
  6. sharedir = ${prefix}/share
  7. mandir = ${sharedir}/man
  8. O=aoe.o ${PLATFORM}.o ata.o
  9. CFLAGS += -Wall -g -O2
  10. CC = gcc
  11. vblade: $O
  12. ${CC} -o vblade $O
  13. aoe.o : aoe.c config.h dat.h fns.h makefile
  14. ${CC} ${CFLAGS} -c $<
  15. ${PLATFORM}.o : ${PLATFORM}.c config.h dat.h fns.h makefile
  16. ${CC} ${CFLAGS} -c $<
  17. ata.o : ata.c config.h dat.h fns.h makefile
  18. ${CC} ${CFLAGS} -c $<
  19. config.h : config/config.h.in makefile
  20. @if ${CC} ${CFLAGS} config/u64.c > /dev/null 2>&1; then \
  21. sh -xc "cp config/config.h.in config.h"; \
  22. else \
  23. sh -xc "sed 's!^//u64 !!' config/config.h.in > config.h"; \
  24. fi
  25. clean :
  26. rm -f $O vblade
  27. install : vblade vbladed
  28. install vblade ${sbindir}/
  29. install vbladed ${sbindir}/
  30. install vblade.8 ${mandir}/man8/