Makefile 854 B

1234567891011121314151617181920212223242526272829
  1. # This is BSD Makefile
  2. # BSD GNU
  3. # ${.TARGET} $@
  4. # ${.ALLSRC} $^
  5. # ${.IMPSRC} $<
  6. CFLAGS += -Wall -O0 -g
  7. all: libdlobsdwrap.so lindev BlackBox BlackBox-dl
  8. # libdlobsdwrap.so: universal method of correct access to dl* functions
  9. # in case of dynamic loading of libBB*.so "ld.so" in LibDl may be used instead of "libc.so", but not in case of static linking
  10. # wrapper method is universal
  11. # -pthread required to dlopen libraries that depends on pthread
  12. BlackBox: BlackBox.c
  13. ${CC} ${CFLAGS} -o ${.TARGET} ${.ALLSRC} -L. -lBB -pthread
  14. BlackBox-dl: BlackBox-dl.c
  15. ${CC} ${CFLAGS} -o ${.TARGET} ${.ALLSRC} -pthread
  16. lindev: BlackBox1.c
  17. ${CC} ${CFLAGS} -o ${.TARGET} ${.ALLSRC} -L . -lBB0
  18. libdlobsdwrap.so: libdlobsdwrap.c
  19. ${CC} ${CFLAGS} -o ${.TARGET} ${.ALLSRC} -fPIC -shared
  20. clean:
  21. rm -f lindev BlackBox BlackBox-dl libdlobsdwrap.so