makefile 930 B

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