Makefile 824 B

123456789101112131415161718192021222324252627282930
  1. # This is BSD Makefile
  2. # BSD GNU
  3. # ${.TARGET} $@
  4. # ${.ALLSRC} $^
  5. # ${.IMPSRC} $<
  6. CFLAGS += -Wall -O0 -g
  7. all: libdlobsdwrap.so dev0 BlackBox
  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: BlackBox-dl.c
  15. ${CC} ${CFLAGS} -o ${.TARGET} ${.ALLSRC} -pthread
  16. dev0: 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 dev0 BlackBox libdlobsdwrap.so