makefile 874 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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 bpf.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. bpf.o : bpf.c
  20. ${CC} ${CFLAGS} -c $<
  21. config.h : config/config.h.in makefile
  22. @if ${CC} ${CFLAGS} config/u64.c > /dev/null 2>&1; then \
  23. sh -xc "cp config/config.h.in config.h"; \
  24. else \
  25. sh -xc "sed 's!^//u64 !!' config/config.h.in > config.h"; \
  26. fi
  27. clean :
  28. rm -f $O vblade
  29. install : vblade vbladed
  30. install vblade ${sbindir}/
  31. install vbladed ${sbindir}/
  32. install vblade.8 ${mandir}/man8/