Makefile 815 B

123456789101112131415161718192021
  1. all: libdlobsdwrap.so lindev BlackBox BlackBox-dl
  2. # libdlobsdwrap.so: universal method of correct access to dl* functions
  3. # 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
  4. # wrapper method is universal
  5. # -pthread required to dlopen libraries that depends on pthread
  6. BlackBox: BlackBox.c
  7. ${CC} ${CFLAGS} -Wall -O0 -g -o ${.TARGET} ${.ALLSRC} -L. -lBB -Wl,-E -pthread -ldlobsdwrap
  8. BlackBox-dl: BlackBox-dl.c
  9. ${CC} ${CFLAGS} -Wall -O0 -g -o ${.TARGET} ${.ALLSRC} -pthread
  10. lindev: BlackBox1.c
  11. ${CC} ${CFLAGS} -Wall -O0 -g -o ${.TARGET} ${.ALLSRC} -L . -lBB0 -ldlobsdwrap
  12. libdlobsdwrap.so: libdlobsdwrap.c
  13. ${CC} ${CFLAGS} -Wall -O0 -g -o ${.TARGET} ${.ALLSRC} -fPIC -shared
  14. clean:
  15. rm -f lindev BlackBox BlackBox-dl libdlobsdwrap.so