home *** CD-ROM | disk | FTP | other *** search
/ linuxmafia.com 2016 / linuxmafia.com.tar / linuxmafia.com / pub / palmos / pippy-0.6beta-src.tar.gz / pippy-0.6beta-src.tar / pippy-0.6beta-src / src / Modules / Makefile.pre.in < prev    next >
Makefile  |  2000-12-21  |  7KB  |  252 lines

  1. # META-NOTE: this note is different from the note in the other Makefiles!
  2. # NOTE: Makefile.pre.in is converted into Makefile.pre by the configure
  3. # script in the toplevel directory or by ../config.status.
  4. # Makefile.pre is converted into Makefile by running the makesetup
  5. # script in the source directory.  Once Makefile exists, it can be
  6. # brought up to date by running "make Makefile".  (The makesetup also
  7. # creates config.c from config.c.in in the source directory.)
  8.  
  9. # === Variables set by makesetup ===
  10.  
  11. MODOBJS=    _MODOBJS_
  12. MODLIBS=    _MODLIBS_
  13. PALM_CFLAGS=    @PALM_CFLAGS@
  14.  
  15. # === Variables set by configure ===
  16.  
  17. VERSION=    @VERSION@
  18. srcdir=        @srcdir@
  19. VPATH=        @srcdir@
  20.  
  21. @SET_CXX@
  22. CC=        @CC@
  23. RANLIB=        @RANLIB@
  24. AR=        @AR@
  25.  
  26. OPT=        @OPT@
  27. LDFLAGS=    @LDFLAGS@
  28. LDLAST=        @LDLAST@
  29. SGI_ABI=    @SGI_ABI@
  30.  
  31. DEFS=        @DEFS@
  32. LIBS=        @LIBS@
  33. LIBM=        @LIBM@
  34. LIBC=        @LIBC@
  35.  
  36. # Machine-dependent subdirectories
  37. MACHDEP=    @MACHDEP@
  38.  
  39. # Install prefix for architecture-independent files
  40. prefix=        @prefix@
  41.  
  42. # Install prefix for architecture-dependent files
  43. exec_prefix=    @exec_prefix@
  44.  
  45. # Expanded directories
  46. BINDIR=        $(exec_prefix)/bin
  47. LIBDIR=        $(exec_prefix)/lib
  48. MANDIR=        $(prefix)/man
  49. INCLUDEDIR=    $(prefix)/include
  50. SCRIPTDIR=    $(prefix)/lib
  51.  
  52. # Detailed destination directories
  53. BINLIBDEST=    $(LIBDIR)/python$(VERSION)
  54. LIBDEST=    $(SCRIPTDIR)/python$(VERSION)
  55. INCLUDEPY=    $(INCLUDEDIR)/python$(VERSION)
  56. LIBP=        $(LIBDIR)/python$(VERSION)
  57.  
  58. # Symbols used for using shared libraries
  59. SO=        @SO@
  60. LDSHARED=    @LDSHARED@
  61. CCSHARED=    @CCSHARED@
  62. LINKFORSHARED=    @LINKFORSHARED@
  63. DESTSHARED=    $(BINLIBDEST)/lib-dynload
  64.  
  65. # Portable install script (configure doesn't always guess right)
  66. INSTALL=    @srcdir@/../install-sh -c
  67. INSTALL_PROGRAM=${INSTALL} -m 755
  68. INSTALL_DATA=    ${INSTALL} -m 644
  69. # Shared libraries must be installed with executable mode on some systems;
  70. # rather than figuring out exactly which, we always give them executable mode.
  71. # Also, making them read-only seems to be a good idea...
  72. INSTALL_SHARED=    ${INSTALL} -m 555
  73.  
  74. # === Variables that are customizable by hand or by inclusion in Setup ===
  75.  
  76. LINKCC=        @LINKCC@
  77. INCLDIR=    $(srcdir)/../Include
  78. CONFIGINCLDIR=    ..
  79. CFLAGS=        $(OPT) -I$(INCLDIR) -I$(CONFIGINCLDIR) $(DEFS) $(PALM_CFLAGS)
  80.  
  81. MKDEP=        mkdep
  82. SHELL=        /bin/sh
  83.  
  84. MAKESETUP=    $(srcdir)/makesetup
  85.  
  86. # (The makesetup script inserts all variable definitions
  87. # found in the Setup file just below the following line.
  88. # This means that the Setup file can override any of the definitions
  89. # given before this point, but not any given below.
  90. # The script insert the definitions in reverse order,
  91. # for the benefits of independent extensions.)
  92. # === Definitions added by makesetup ===
  93.  
  94. # === Fixed definitions ===
  95.  
  96. FIXOBJS=    config.o getpath.o main.o getbuildinfo.o
  97. OBJS=        $(MODOBJS) $(FIXOBJS)
  98.  
  99. #MAINOBJ=    python.o
  100. MAINOBJ=    @MAINOBJ@
  101.  
  102. SYSLIBS=    $(LIBM) $(LIBC)
  103.  
  104. LIBRARY=    ../libpython$(VERSION).a
  105. LDLIBRARY=    ../@LDLIBRARY@
  106.  
  107. # === Rules ===
  108.  
  109. all:        $(OBJS)
  110.  
  111. # This target is used by the master Makefile to add the objects to the library.
  112. # To deal with the conflict between signalmodule.o and
  113. # sigcheck.o+intrcheck.o, we remove the latter two if we have the former.
  114. add2lib:    $(OBJS)
  115.         -if test -f hassignal; \
  116.         then echo removing sigcheck.o intrcheck.o; \
  117.              $(AR) d $(LIBRARY) sigcheck.o intrcheck.o 2>/dev/null; \
  118.         else echo leaving sigcheck.o intrcheck.o in; fi
  119.         $(AR) cr $(LIBRARY) $(OBJS)
  120.         touch add2lib
  121.  
  122. # Use ``EXE=.exe'' for Unix emulations on DOS/Windows
  123. EXE=
  124.  
  125. # This target is used by the master Makefile to link the final binary.
  126. link:        $(MAINOBJ)
  127.         $(LINKCC) $(LDFLAGS) $(LINKFORSHARED) $(MAINOBJ) \
  128.           $(LDLIBRARY) $(MODLIBS) $(LIBS) $(SYSLIBS) -o python $(LDLAST)
  129.         mv python$(EXE) ../python$(EXE)
  130.  
  131. clean:
  132.         -rm -f *.o python$(EXE) core *~ [@,#]* *.old *.orig *.rej
  133.         -rm -f add2lib hassignal
  134.  
  135. clobber:    clean
  136.         -rm -f *.a tags TAGS config.c Makefile.pre
  137.         -rm -f *.so *.sl so_locations
  138.  
  139. getpath.o:    getpath.c Makefile
  140.         $(CC) -c $(CFLAGS) -DPYTHONPATH='"$(PYTHONPATH)"' \
  141.               -DPREFIX='"$(prefix)"' \
  142.               -DEXEC_PREFIX='"$(exec_prefix)"' \
  143.               -DVERSION='"$(VERSION)"' \
  144.               -DVPATH='"$(VPATH)"' \
  145.               $(srcdir)/getpath.c
  146.  
  147. # When the configuration changes, we remove the library, so that it
  148. # gets remade from scratch; this ensures to remove modules that are no
  149. # longer pertinent (but that were in a previous configuration).
  150. config.c Makefile: Makefile.pre config.c.in $(MAKESETUP)
  151. config.c Makefile: Setup.thread Setup Setup.local
  152. config.c Makefile:
  153.         -rm -f $(LIBRARY)
  154.         $(SHELL) $(MAKESETUP) Setup.thread Setup.local Setup
  155.  
  156. hassignal:
  157.         -rm -f hassignal
  158.         -for i in $(OBJS); do \
  159.             if test "$$i" = "signalmodule.o"; then \
  160.                echo yes >hassignal; break; \
  161.             fi; \
  162.         done
  163.  
  164. Setup:
  165.         cp $(srcdir)/Setup.in Setup
  166.  
  167. Setup.local:
  168.         echo "# Edit this file for local setup changes" >Setup.local
  169.  
  170. Makefile.pre:    Makefile.pre.in ../config.status
  171.         (cd ..; CONFIG_FILES=Modules/Makefile.pre CONFIG_HEADERS= \
  172.         $(SHELL) config.status)
  173.  
  174. depend:
  175.         $(MKDEP) $(CFLAGS) `echo $(OBJS) | tr ' ' '\012' | \
  176.                     sed 's|\(.*\)\.o|$(srcdir)/\1.c|'`
  177.  
  178. .PRECIOUS:    ../python$(EXE)
  179.  
  180. glmodule.c:    $(srcdir)/cgen.py $(srcdir)/cstubs
  181.         python $(srcdir)/cgen.py <$(srcdir)/cstubs >glmodule.c
  182.  
  183. almodule.o: almodule.c
  184. arraymodule.o: arraymodule.c
  185. audioop.o: audioop.c
  186. cdmodule.o: cdmodule.c
  187. cgensupport.o: cgensupport.c
  188. clmodule.o: clmodule.c
  189. dbmmodule.o: dbmmodule.c
  190. errnomodule.o: errnomodule.c
  191. fcntlmodule.o: fcntlmodule.c
  192. flmodule.o: flmodule.c
  193. fmmodule.o: fmmodule.c
  194. glmodule.o: glmodule.c
  195. imageop.o: imageop.c
  196. imgfile.o: imgfile.c
  197. main.o: main.c
  198. mathmodule.o: mathmodule.c
  199. md5c.o: md5c.c
  200. md5module.o: md5module.c
  201. mpzmodule.o: mpzmodule.c
  202. nismodule.o: nismodule.c
  203. operator.o: operator.c
  204. parsermodule.o: parsermodule.c
  205. posixmodule.o: posixmodule.c
  206. pwdmodule.o: pwdmodule.c
  207. regexmodule.o: regexmodule.c
  208. regexpr.o: regexpr.c
  209. resource.o: resource.c
  210. rgbimgmodule.o: rgbimgmodule.c
  211. rotormodule.o: rotormodule.c
  212. selectmodule.o: selectmodule.c
  213. sgimodule.o: sgimodule.c
  214. socketmodule.o: socketmodule.c
  215. stdwinmodule.o: stdwinmodule.c
  216. stropmodule.o: stropmodule.c
  217. structmodule.o: structmodule.c
  218. sunaudiodev.o: sunaudiodev.c
  219. svmodule.o: svmodule.c
  220. threadmodule.o: threadmodule.c
  221. timemodule.o: timemodule.c
  222. timingmodule.o: timingmodule.c
  223. xxmodule.o: xxmodule.c
  224. yuvconvert.o: yuvconvert.c
  225.  
  226. # Rules to build and install all shared modules
  227. sharedmods:    $(SHAREDMODS)
  228. sharedinstall:    $(DESTSHARED) $(SHAREDMODS)
  229.         -for i in X $(SHAREDMODS); do \
  230.             if test $$i != X; \
  231.             then $(INSTALL_SHARED) $$i $(DESTSHARED)/$$i; \
  232.             fi; \
  233.         done
  234.  
  235. DESTDIRS=    $(exec_prefix) $(LIBDIR) $(BINLIBDEST) $(DESTSHARED)
  236.  
  237. $(DESTSHARED): 
  238.         @for i in $(DESTDIRS); \
  239.         do \
  240.             if test ! -d $$i; then \
  241.                 echo "Creating directory $$i"; \
  242.                 mkdir $$i; \
  243.                 chmod 755 $$i; \
  244.             else    true; \
  245.             fi; \
  246.         done
  247.  
  248. ccpython.o: ccpython.cc
  249.     $(CXX) $(CFLAGS) -c $*.cc
  250.  
  251. # Stuff is appended here by makesetup and make depend
  252.