Makefile
上传用户:hongyu5696
上传日期:2018-01-22
资源大小:391k
文件大小:7k
源码类别:

PlugIns编程

开发平台:

Unix_Linux

  1. #!make
  2. ################################################################################
  3. # Copyright (c) 1996 Netscape Communications. All rights reserved.
  4. ################################################################################
  5. #
  6. # Template plugin makefile
  7. # This makefile contains some of our defines for the compiler:
  8. #
  9. # XP_UNIX This needs to get defined for npapi.h on unix platforms.
  10. # PLUGIN_TRACE Enable this define to get debug prints whenever the plugin
  11. # api gets control.
  12. CC= gcc
  13. CXX= g++
  14. CFLAGS= -Wall -g -O2  -I/usr/X11R6/include  -g -O2  -DXP_UNIX -DMOZ_X11 -I/usr/include/mozilla-1.7.8/java -I/usr/include/mozilla-1.7.8/plugin -I/usr/include/mozilla-1.7.8 -I/usr/include/mozilla-1.7.8/xpcom -I/usr/include/mozilla-1.7.8/string -I/usr/include/mozilla-1.7.8/nspr   -I/usr/include/mozilla-1.7.8 -Iinclude -fPIC  -DXTHREADS -D_REENTRANT -DXUSE_MTSAFE_API -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/X11R6/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/freetype2/config -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -DXTHREADS -D_REENTRANT -DXUSE_MTSAFE_API -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/X11R6/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/freetype2/config -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -DGTK_ENABLED 
  15. LDFLAGS=     -L/usr/X11R6/lib  -lX11   -lSM -lICE -lXext -lX11 -lXpm -lXt -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangoxft-1.0 -lpangox-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0   -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangoxft-1.0 -lpangox-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0   -pthread -lgthread-2.0 -lglib-2.0  
  16. LIBOBJS= 
  17. OBJ= plugin.o nsScriptablePeer.o npp_gate.o np_entry.o npn_gate.o 
  18. plugin-support.o plugin-setup.o plugin-list.o plugin-ui.o 
  19. plugin-threads.o strlcpy.o strlcat.o $(LIBOBJS)
  20. OBJ_WMP= plugin.o nsScriptablePeer.o npp_gate.o np_entry.o npn_gate.o 
  21. plugin-support.o plugin-setup-wmp.o plugin-list.o plugin-ui.o 
  22. plugin-threads.o strlcpy.o strlcat.o $(LIBOBJS)
  23. OBJ_QT= plugin.o nsScriptablePeer.o npp_gate.o np_entry.o npn_gate.o 
  24. plugin-support.o plugin-setup-qt.o plugin-list.o plugin-ui.o 
  25. plugin-threads.o strlcpy.o strlcat.o $(LIBOBJS)
  26. OBJ_RM= plugin.o nsScriptablePeer.o npp_gate.o np_entry.o npn_gate.o 
  27. plugin-support.o plugin-setup-rm.o plugin-list.o plugin-ui.o 
  28. plugin-threads.o strlcpy.o strlcat.o $(LIBOBJS)
  29. OBJ_GMP= plugin.o nsScriptablePeer.o npp_gate.o np_entry.o npn_gate.o 
  30. plugin-support.o plugin-setup-gmp.o plugin-list.o plugin-ui.o 
  31. plugin-threads.o strlcpy.o strlcat.o $(LIBOBJS)
  32. OBJ_DVX= plugin.o nsScriptablePeer.o npp_gate.o np_entry.o npn_gate.o 
  33. plugin-support.o plugin-setup-dvx.o plugin-list.o plugin-ui.o 
  34. plugin-threads.o strlcpy.o strlcat.o $(LIBOBJS)
  35. INSTALL = /usr/bin/install -c
  36. SHAREDTARGET=downloadplug-in
  37. NP_HEADERS= include/npplat.h include/pluginbase.h
  38. SUBDIR= languages
  39. INSTALL_SUBDIR= install-languages
  40. prefix=/usr/local
  41. exec_prefix=${prefix}
  42. sysconfdir=${prefix}/etc
  43. libdir=${exec_prefix}/lib
  44. datadir=${prefix}/share
  45. LOCALEDIR=$(datadir)/locale
  46. MOZILLA_HOME=
  47. PIXMAPS=pixmaps/logo.xpm pixmaps/progress_left.xpm pixmaps/progress_right.xpm 
  48. pixmaps/progress_fill.xpm pixmaps/progress_middle.xpm
  49. HEADERS=config.h $(NP_HEADERS)
  50. SCRIPTABLEHEADERS=Source/nsScriptablePeer.h Source/plugin.h config.h 
  51. Source/plugin-setup.h Source/nsIScriptabledownloadPlugin.h $(HEADERS)
  52. default all: downloadplug-in languages
  53. $(SHAREDTARGET): $(OBJ)
  54. $(CXX) -shared -o $(SHAREDTARGET).so $(OBJ) $(CFLAGS) $(LDFLAGS)
  55. cp Source/nsIScriptabledownloadPlugin.xpt downloadplug-in.xpt
  56. $(SHAREDTARGET)-wmp: $(OBJ_WMP)
  57. $(CXX) -shared -o $(SHAREDTARGET)-wmp.so $(OBJ_WMP) $(CFLAGS) $(LDFLAGS)
  58. cp Source/nsIScriptabledownloadPlugin.xpt downloadplug-in-wmp.xpt
  59. $(SHAREDTARGET)-qt: $(OBJ_QT)
  60. $(CXX) -shared -o $(SHAREDTARGET)-qt.so $(OBJ_QT) $(CFLAGS) $(LDFLAGS)
  61. cp Source/nsIScriptabledownloadPlugin.xpt downloadplug-in-qt.xpt
  62. $(SHAREDTARGET)-rm: $(OBJ_RM)
  63. $(CXX) -shared -o $(SHAREDTARGET)-rm.so $(OBJ_RM) $(CFLAGS) $(LDFLAGS)
  64. cp Source/nsIScriptabledownloadPlugin.xpt downloadplug-in-rm.xpt
  65. $(SHAREDTARGET)-gmp: $(OBJ_GMP)
  66. $(CXX) -shared -o $(SHAREDTARGET)-gmp.so $(OBJ_GMP) $(CFLAGS) $(LDFLAGS)
  67. cp Source/nsIScriptabledownloadPlugin.xpt downloadplug-in-gmp.xpt
  68. $(SHAREDTARGET)-dvx: $(OBJ_DVX)
  69. $(CXX) -shared -o $(SHAREDTARGET)-dvx.so $(OBJ_DVX) $(CFLAGS) $(LDFLAGS)
  70. cp Source/nsIScriptabledownloadPlugin.xpt downloadplug-in-dvx.xpt
  71. np_entry.o: plugingate/np_entry.cpp
  72. $(CXX) -c -o $@ $(CFLAGS) plugingate/np_entry.cpp
  73. npp_gate.o: plugingate/npp_gate.cpp
  74. $(CXX) -c -o $@ $(CFLAGS) plugingate/npp_gate.cpp
  75. npn_gate.o: plugingate/npn_gate.cpp
  76. $(CXX) -c -o $@ $(CFLAGS) plugingate/npn_gate.cpp
  77. plugin.o: Source/plugin.cpp $(SCRIPTABLEHEADERS)
  78. $(CXX) -c -o $@ $(CFLAGS) $(LIBS) Source/plugin.cpp
  79. plugin-setup.o: Source/plugin-setup.cpp $(SCRIPTABLEHEADERS)
  80. $(CXX) -c -o $@ $(CFLAGS) $(LIBS) -DSTD Source/plugin-setup.cpp
  81. plugin-setup-wmp.o: Source/plugin-setup.cpp $(SCRIPTABLEHEADERS)
  82. $(CXX) -c -o $@ $(CFLAGS) $(LIBS) -DWMP Source/plugin-setup.cpp
  83. plugin-setup-qt.o: Source/plugin-setup.cpp $(SCRIPTABLEHEADERS)
  84. $(CXX) -c -o $@ $(CFLAGS) $(LIBS) -DQT Source/plugin-setup.cpp
  85. plugin-setup-rm.o: Source/plugin-setup.cpp $(SCRIPTABLEHEADERS)
  86. $(CXX) -c -o $@ $(CFLAGS) $(LIBS) -DRM Source/plugin-setup.cpp
  87. plugin-setup-gmp.o: Source/plugin-setup.cpp $(SCRIPTABLEHEADERS)
  88. $(CXX) -c -o $@ $(CFLAGS) $(LIBS) -DGMP Source/plugin-setup.cpp
  89. plugin-setup-dvx.o: Source/plugin-setup.cpp $(SCRIPTABLEHEADERS)
  90. $(CXX) -c -o $@ $(CFLAGS) $(LIBS) -DDVX Source/plugin-setup.cpp
  91. plugin-support.o: Source/plugin-support.cpp $(SCRIPTABLEHEADERS)
  92. $(CXX) -c -o $@ $(CFLAGS) $(LIBS) Source/plugin-support.cpp
  93. plugin-list.o: Source/plugin-list.cpp $(SCRIPTABLEHEADERS)
  94. $(CXX) -c -o $@ $(CFLAGS) $(LIBS) Source/plugin-list.cpp
  95. plugin-ui.o: Source/plugin-ui.cpp $(SCRIPTABLEHEADERS) $(PIXMAPS)
  96. $(CXX) -c -o $@ $(CFLAGS) Source/plugin-ui.cpp
  97. plugin-threads.o: Source/plugin-threads.cpp $(SCRIPTABLEHEADERS)
  98. $(CXX) -c -o $@ $(CFLAGS) Source/plugin-threads.cpp
  99. nsScriptablePeer.o: Source/nsScriptablePeer.cpp $(SCRIPTABLEHEADERS)
  100. $(CXX) -c -o $@ $(CFLAGS) Source/nsScriptablePeer.cpp
  101. memmem.o: extras/memmem.c $(HEADERS)
  102. $(CC) -c -o $@ $(CFLAGS) extras/memmem.c
  103. strlcat.o: extras/strlcat.c $(HEADERS)
  104. $(CC) -c -o $@ $(CFLAGS) extras/strlcat.c
  105. strlcpy.o: extras/strlcpy.c $(HEADERS)
  106. $(CC) -c -o $@ $(CFLAGS) extras/strlcpy.c
  107. clean:
  108. $(RM) $(OBJ) $(OBJ_WMP) $(OBJ_QT) $(OBJ_RM) $(OBJ_GMP) $(OBJ_DVX) $(SHAREDTARGET)*.so $(SHAREDTARGET)*.xpt
  109. make -C po clean
  110. install: all 
  111. ./install.sh $(DESTDIR)
  112. languages:
  113. make -C po
  114. uninstall:
  115. ./uninstall.sh