Makefile.in 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. LIBNAME= libzencod
  2. SRC= hw_zencod.c
  3. OBJ= hw_zencod.o
  4. HEADER= hw_zencod.h
  5. CC= gcc
  6. PIC= -fPIC
  7. CFLAGS= -g -I../../../include $(PIC) -DENGINE_DYNAMIC_SUPPORT -DFLAT_INC
  8. AR= ar r
  9. RANLIB= ranlib
  10. LIB= $(LIBNAME).a
  11. SHLIB= $(LIBNAME).so
  12. all:
  13. @echo 'Please choose a system to build on:'
  14. @echo ''
  15. @echo 'tru64: Tru64 Unix, Digital Unix, Digital OSF/1'
  16. @echo 'solaris: Solaris'
  17. @echo 'irix: IRIX'
  18. @echo 'hpux32: 32-bit HP/UX'
  19. @echo 'hpux64: 64-bit HP/UX'
  20. @echo 'aix: AIX'
  21. @echo 'gnu: Generic GNU-based system (gcc and GNU ld)'
  22. @echo ''
  23. generate:
  24. perl ../../../util/mkerr.pl -conf hw_zencod.ec \
  25. -nostatic -staticloader -write hw_zencod.c
  26. gnu: $(SHLIB).gnu
  27. tru64: $(SHLIB).tru64
  28. solaris: $(SHLIB).solaris
  29. irix: $(SHLIB).irix
  30. hpux32: $(SHLIB).hpux32
  31. hpux64: $(SHLIB).hpux64
  32. aix: $(SHLIB).aix
  33. $(LIB): $(OBJ)
  34. $(AR) $(LIB) $(OBJ)
  35. - $(RANLIB) $(LIB)
  36. LINK_SO= \
  37. ld -r -o $(LIBNAME).o $$ALLSYMSFLAGS $(LIB) && \
  38. (nm -Pg $(LIBNAME).o | grep ' [BDT] ' | cut -f1 -d' ' > $(LIBNAME).exp; \
  39. $$SHAREDCMD $$SHAREDFLAGS -o $(SHLIB) $(LIBNAME).o -L ../../.. -lcrypto -lc)
  40. $(SHLIB).gnu: $(LIB)
  41. ALLSYMSFLAGS='--whole-archive' \
  42. SHAREDFLAGS='-shared -Wl,-soname=$(SHLIB)' \
  43. SHAREDCMD='$(CC)'; \
  44. $(LINK_SO)
  45. touch $(SHLIB).gnu
  46. $(SHLIB).tru64: $(LIB)
  47. ALLSYMSFLAGS='-all' \
  48. SHAREDFLAGS='-shared' \
  49. SHAREDCMD='$(CC)'; \
  50. $(LINK_SO)
  51. touch $(SHLIB).tru64
  52. $(SHLIB).solaris: $(LIB)
  53. ALLSYMSFLAGS='-z allextract' \
  54. SHAREDFLAGS='-G -h $(SHLIB)' \
  55. SHAREDCMD='$(CC)'; \
  56. $(LINK_SO)
  57. touch $(SHLIB).solaris
  58. $(SHLIB).irix: $(LIB)
  59. ALLSYMSFLAGS='-all' \
  60. SHAREDFLAGS='-shared -Wl,-soname,$(SHLIB)' \
  61. SHAREDCMD='$(CC)'; \
  62. $(LINK_SO)
  63. touch $(SHLIB).irix
  64. $(SHLIB).hpux32: $(LIB)
  65. ALLSYMSFLAGS='-Fl' \
  66. SHAREDFLAGS='+vnocompatwarnings -b -z +s +h $(SHLIB)' \
  67. SHAREDCMD='/usr/ccs/bin/ld'; \
  68. $(LINK_SO)
  69. touch $(SHLIB).hpux32
  70. $(SHLIB).hpux64: $(LIB)
  71. ALLSYMSFLAGS='+forceload' \
  72. SHAREDFLAGS='-b -z +h $(SHLIB)' \
  73. SHAREDCMD='/usr/ccs/bin/ld'; \
  74. $(LINK_SO)
  75. touch $(SHLIB).hpux64
  76. $(SHLIB).aix: $(LIB)
  77. ALLSYMSFLAGS='-bnogc' \
  78. SHAREDFLAGS='-G -bE:$(LIBNAME).exp -bM:SRE' \
  79. SHAREDCMD='$(CC)'; \
  80. $(LINK_SO)
  81. touch $(SHLIB).aix
  82. depend:
  83. sed -e '/^# DO NOT DELETE.*/,$$d' < Makefile > Makefile.tmp
  84. echo '# DO NOT DELETE THIS LINE -- make depend depends on it.' >> Makefile.tmp
  85. gcc -M $(CFLAGS) $(SRC) >> Makefile.tmp
  86. perl ../../../util/clean-depend.pl < Makefile.tmp > Makefile.new
  87. rm -f Makefile.tmp Makefile
  88. mv Makefile.new Makefile
  89. # DO NOT DELETE THIS LINE -- make depend depends on it.