home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / cvs-1.8.7-src.tgz / tar.out / fsf / cvs / os2 / Makefile.in < prev    next >
Makefile  |  1996-09-28  |  11KB  |  340 lines

  1. # Makefile for OS/2.  Generated from Makefile.in when CVS is
  2. # configured for a dist-build.  Configure never gets run on OS/2, so
  3. # we must include the generated Makefile in the distribution.  See the
  4. # `dist-dir' rule.
  5.  
  6. project: cvs.exe
  7. # .SUFFIXES .c .obj .exe
  8.  
  9. # path slash.  This was introduced so that it can be set to \
  10. # instead of / for linking, but now that the cvs.exe rule uses
  11. # subst to produce \, it should be possible to nuke SL.
  12. SL = /
  13.  
  14. # Directory in which to install executables.
  15. install_dir = s:${SL}gnu${SL}util
  16.  
  17. # srcdir is usually "."
  18. srcdir     = @srcdir@
  19.  
  20. # top_srcdir is usually ".."
  21. top_srcdir = @top_srcdir@
  22.  
  23. lib_dir     = @top_srcdir@${SL}lib
  24. cvs_srcdir = @top_srcdir@${SL}src
  25.  
  26. zlib_dir = ${top_srcdir}/zlib
  27.  
  28. # Do we need these?
  29. # prefix = /usr/local
  30. # exec_prefix = ${prefix}
  31.  
  32. # taken straight from the example project
  33. LIB = s:${SL}ibmcpp${SL}lib;s:${SL}toolkt21${SL}os2lib;
  34. CINC = -Is:${SL}ibmcpp${SL}include -Is:${SL}toolkt21${SL}c${SL}os2h
  35. # This says we are building an object file, not a full executable.
  36. OBJ_CFLAGS = -C+
  37. CFLAGS = -W3 -Wpro+rea+tru+use+ -Ti+ -Ss+ -Gd+ -Gm+ -G4 -Q+ -Sm ${CINC} \
  38.   -I${srcdir} -I${lib_dir} -I${cvs_srcdir} -I${zlib_dir} \
  39.   -DIBM_CPP -DHAVE_CONFIG_H \
  40.   -DTCPIP_IBM -Is:${SL}ibmtcpip${SL}include
  41.  
  42. # needed to make command-line wildcard expansion work right.  That's
  43. # right, DOS-descendants handle this from the program, not the shell.
  44. ARGVLIB = s:${SL}ibmcpp${SL}lib${SL}setargv.obj
  45.  
  46. # TCP/IP stuff
  47. TCPIPLIB = s:${SL}ibmtcpip${SL}lib${SL}tcp32dll.lib    s:${SL}ibmtcpip${SL}lib${SL}so32dll.lib
  48.  
  49.  
  50. # headers specific to OS/2
  51.  
  52. # We list OS2_HEADERS so we know what to include when we make dist-dir
  53. # here.
  54. OS2_HEADERS = \
  55.        ${srcdir}${SL}tcpip.h \
  56.        ${srcdir}${SL}config.h \
  57.        ${srcdir}${SL}options.h \
  58.        ${srcdir}${SL}pwd.h \
  59.        ${srcdir}${SL}dirent.h \
  60.        ${srcdir}${SL}rcmd.h \
  61.        ${srcdir}${SL}popen.h
  62.  
  63. # headers we use from the common src dir, ..${SL}src
  64. COMMON_HEADERS = \
  65.        ${cvs_srcdir}${SL}client.h \
  66.        ${cvs_srcdir}${SL}cvs.h \
  67.        ${cvs_srcdir}${SL}rcs.h \
  68.        ${cvs_srcdir}${SL}hash.h \
  69.        ${cvs_srcdir}${SL}myndbm.h \
  70.        ${cvs_srcdir}${SL}patchlevel.h \
  71.        ${cvs_srcdir}${SL}update.h \
  72.        ${cvs_srcdir}${SL}server.h \
  73.        ${cvs_srcdir}${SL}error.h
  74.  
  75. # sources specific to OS/2
  76. OS2_SOURCES = \
  77.        ${srcdir}${SL}mkdir.c \
  78.        ${srcdir}${SL}pwd.c \
  79.        ${srcdir}${SL}filesubr.c \
  80.        ${srcdir}${SL}dirent.c \
  81.        ${srcdir}${SL}run.c \
  82.        ${srcdir}${SL}stripslash.c \
  83.        ${srcdir}${SL}rcmd.c \
  84.        ${srcdir}${SL}waitpid.c \
  85.        ${srcdir}${SL}popen.c \
  86.        ${srcdir}${SL}porttcp.c \
  87.        ${srcdir}${SL}strippath.c \
  88.        ${srcdir}${SL}getdate.c \
  89.        ${srcdir}${SL}getpass.c
  90.  
  91. # sources we use from the common src dir, ..${SL}src
  92. # FIXME: Is this used anywhere?  I don't think it is.
  93. COMMON_SOURCES = \
  94.        ${cvs_srcdir}${SL}add.c \
  95.        ${cvs_srcdir}${SL}admin.c \
  96.        ${cvs_srcdir}${SL}buffer.c \
  97.        ${cvs_srcdir}${SL}checkin.c \
  98.        ${cvs_srcdir}${SL}checkout.c \
  99.        ${cvs_srcdir}${SL}classify.c \
  100.        ${cvs_srcdir}${SL}client.c \
  101.        ${cvs_srcdir}${SL}commit.c \
  102.        ${cvs_srcdir}${SL}create_adm.c \
  103.        ${cvs_srcdir}${SL}cvsrc.c \
  104.        ${cvs_srcdir}${SL}diff.c \
  105.        ${cvs_srcdir}${SL}edit.c \
  106.        ${cvs_srcdir}${SL}entries.c \
  107.        ${cvs_srcdir}${SL}error.c \
  108.        ${cvs_srcdir}${SL}expand_path.c \
  109.        ${cvs_srcdir}${SL}fileattr.c \
  110.        ${cvs_srcdir}${SL}find_names.c \
  111.        ${cvs_srcdir}${SL}hash.c \
  112.        ${cvs_srcdir}${SL}history.c \
  113.        ${cvs_srcdir}${SL}ignore.c \
  114.        ${cvs_srcdir}${SL}import.c \
  115.        ${cvs_srcdir}${SL}lock.c \
  116.        ${cvs_srcdir}${SL}log.c \
  117.        ${cvs_srcdir}${SL}login.c \
  118.        ${cvs_srcdir}${SL}logmsg.c \
  119.        ${cvs_srcdir}${SL}main.c \
  120.        ${cvs_srcdir}${SL}mkmodules.c \
  121.        ${cvs_srcdir}${SL}modules.c \
  122.        ${cvs_srcdir}${SL}myndbm.c \
  123.        ${cvs_srcdir}${SL}no_diff.c \
  124.        ${cvs_srcdir}${SL}parseinfo.c \
  125.        ${cvs_srcdir}${SL}patch.c \
  126.        ${cvs_srcdir}${SL}rcs.c \
  127.        ${cvs_srcdir}${SL}rcscmds.c \
  128.        ${cvs_srcdir}${SL}recurse.c \
  129.        ${cvs_srcdir}${SL}release.c \
  130.        ${cvs_srcdir}${SL}remove.c \
  131.        ${cvs_srcdir}${SL}repos.c \
  132.        ${cvs_srcdir}${SL}root.c \
  133.        ${cvs_srcdir}${SL}rtag.c \
  134.        ${cvs_srcdir}${SL}scramble.c \
  135.        ${cvs_srcdir}${SL}server.c \
  136.        ${cvs_srcdir}${SL}status.c \
  137.        ${cvs_srcdir}${SL}subr.c \
  138.        ${cvs_srcdir}${SL}tag.c \
  139.        ${cvs_srcdir}${SL}update.c \
  140.        ${cvs_srcdir}${SL}watch.c \
  141.        ${cvs_srcdir}${SL}wrapper.c \
  142.        ${cvs_srcdir}${SL}vers_ts.c \
  143.        ${cvs_srcdir}${SL}version.c
  144. # end of $COMMON_SOURCES
  145.  
  146. # sources from ..${SL}lib
  147. # FIXME: Is this used anywhere?  I don't think it is.
  148. LIB_SOURCES = \
  149.        ${lib_dir}${SL}getopt.c \
  150.        ${lib_dir}${SL}getopt1.c \
  151.        ${lib_dir}${SL}getline.c \
  152.        ${lib_dir}${SL}getwd.c \
  153.        ${lib_dir}${SL}savecwd.c \
  154.        ${lib_dir}${SL}sighandle.c \
  155.        ${lib_dir}${SL}yesno.c \
  156.        ${lib_dir}${SL}vasprintf.c \
  157.        ${lib_dir}${SL}xgetwd.c \
  158.        ${lib_dir}${SL}md5.c \
  159.        ${lib_dir}${SL}fnmatch.c \
  160.        ${lib_dir}${SL}regex.c
  161.  
  162. # object files from OS/2 sources
  163. OS2_OBJECTS = \
  164.        ${srcdir}${SL}mkdir.obj \
  165.        ${srcdir}${SL}pwd.obj \
  166.        ${srcdir}${SL}filesubr.obj \
  167.        ${srcdir}${SL}dirent.obj \
  168.        ${srcdir}${SL}run.obj \
  169.        ${srcdir}${SL}stripslash.obj \
  170.        ${srcdir}${SL}rcmd.obj \
  171.        ${srcdir}${SL}waitpid.obj \
  172.        ${srcdir}${SL}popen.obj \
  173.        ${srcdir}${SL}porttcp.obj \
  174.        ${srcdir}${SL}strippath.obj \
  175.        ${srcdir}${SL}getdate.obj \
  176.        ${srcdir}${SL}getpass.obj
  177.  
  178. # object files from ..${SL}src
  179. COMMON_OBJECTS = \
  180.        ${cvs_srcdir}${SL}add.obj \
  181.        ${cvs_srcdir}${SL}admin.obj \
  182.        ${cvs_srcdir}${SL}buffer.obj \
  183.        ${cvs_srcdir}${SL}checkin.obj \
  184.        ${cvs_srcdir}${SL}checkout.obj \
  185.        ${cvs_srcdir}${SL}classify.obj \
  186.        ${cvs_srcdir}${SL}client.obj \
  187.        ${cvs_srcdir}${SL}commit.obj \
  188.        ${cvs_srcdir}${SL}create_adm.obj \
  189.        ${cvs_srcdir}${SL}cvsrc.obj \
  190.        ${cvs_srcdir}${SL}diff.obj \
  191.        ${cvs_srcdir}${SL}edit.obj \
  192.        ${cvs_srcdir}${SL}entries.obj \
  193.        ${cvs_srcdir}${SL}error.obj \
  194.        ${cvs_srcdir}${SL}expand_path.obj \
  195.        ${cvs_srcdir}${SL}fileattr.obj \
  196.        ${cvs_srcdir}${SL}find_names.obj \
  197.        ${cvs_srcdir}${SL}hash.obj \
  198.        ${cvs_srcdir}${SL}history.obj \
  199.        ${cvs_srcdir}${SL}ignore.obj \
  200.        ${cvs_srcdir}${SL}import.obj \
  201.        ${cvs_srcdir}${SL}lock.obj \
  202.        ${cvs_srcdir}${SL}log.obj \
  203.        ${cvs_srcdir}${SL}login.obj \
  204.        ${cvs_srcdir}${SL}logmsg.obj \
  205.        ${cvs_srcdir}${SL}main.obj \
  206.        ${cvs_srcdir}${SL}mkmodules.obj \
  207.        ${cvs_srcdir}${SL}modules.obj \
  208.        ${cvs_srcdir}${SL}myndbm.obj \
  209.        ${cvs_srcdir}${SL}no_diff.obj \
  210.        ${cvs_srcdir}${SL}parseinfo.obj \
  211.        ${cvs_srcdir}${SL}patch.obj \
  212.        ${cvs_srcdir}${SL}rcs.obj \
  213.        ${cvs_srcdir}${SL}rcscmds.obj \
  214.        ${cvs_srcdir}${SL}recurse.obj \
  215.        ${cvs_srcdir}${SL}release.obj \
  216.        ${cvs_srcdir}${SL}remove.obj \
  217.        ${cvs_srcdir}${SL}repos.obj \
  218.        ${cvs_srcdir}${SL}root.obj \
  219.        ${cvs_srcdir}${SL}rtag.obj \
  220.        ${cvs_srcdir}${SL}scramble.obj \
  221.        ${cvs_srcdir}${SL}server.obj \
  222.        ${cvs_srcdir}${SL}status.obj \
  223.        ${cvs_srcdir}${SL}subr.obj \
  224.        ${cvs_srcdir}${SL}tag.obj \
  225.        ${cvs_srcdir}${SL}update.obj \
  226.        ${cvs_srcdir}${SL}watch.obj \
  227.        ${cvs_srcdir}${SL}wrapper.obj \
  228.        ${cvs_srcdir}${SL}vers_ts.obj \
  229.        ${cvs_srcdir}${SL}version.obj \
  230.        ${cvs_srcdir}/zlib.obj
  231. # end of $COMMON_OBJECTS
  232.  
  233. # objects from ..${SL}lib
  234. LIB_OBJECTS = \
  235.        ${lib_dir}${SL}getopt.obj \
  236.        ${lib_dir}${SL}getopt1.obj \
  237.        ${lib_dir}${SL}getline.obj \
  238.        ${lib_dir}${SL}getwd.obj \
  239.        ${lib_dir}${SL}savecwd.obj \
  240.        ${lib_dir}${SL}sighandle.obj \
  241.        ${lib_dir}${SL}yesno.obj \
  242.        ${lib_dir}${SL}vasprintf.obj \
  243.        ${lib_dir}${SL}xgetwd.obj \
  244.        ${lib_dir}${SL}md5.obj \
  245.        ${lib_dir}${SL}fnmatch.obj \
  246.        ${lib_dir}${SL}regex.obj \
  247.        ${lib_dir}/valloc.obj
  248.  
  249. ZLIB_OBJECTS = ${zlib_dir}/adler32.obj \
  250.        ${zlib_dir}/compress.obj \
  251.        ${zlib_dir}/crc32.obj \
  252.        ${zlib_dir}/uncompr.obj \
  253.        ${zlib_dir}/deflate.obj \
  254.        ${zlib_dir}/trees.obj \
  255.        ${zlib_dir}/zutil.obj \
  256.        ${zlib_dir}/inflate.obj \
  257.        ${zlib_dir}/infblock.obj \
  258.        ${zlib_dir}/inftrees.obj \
  259.        ${zlib_dir}/infcodes.obj \
  260.        ${zlib_dir}/infutil.obj \
  261.        ${zlib_dir}/inffast.obj
  262.  
  263. SOURCES = ${COMMON_SOURCES} ${LIB_SOURCES} ${OS2_SOURCES}
  264. HEADERS = ${COMMON_HEADERS} ${OS2_HEADERS}
  265. OBJECTS = ${COMMON_OBJECTS} ${LIB_OBJECTS} ${OS2_OBJECTS} ${ZLIB_OBJECTS}
  266.  
  267. DISTFILES = ${OS2_HEADERS} ${OS2_SOURCES} \
  268.   ${srcdir}${SL}README ${srcdir}${SL}ChangeLog \
  269.   ${srcdir}${SL}Makefile.in ${srcdir}${SL}.cvsignore \
  270.   ${srcdir}${SL}test-makefile Makefile
  271.  
  272. all:
  273.  
  274. .PHONY: all install uninstall
  275. all install uninstall:
  276.  
  277. installdirs:
  278. .PHONY: installdirs
  279.  
  280. .PHONY: tags TAGS
  281. tags TAGS:
  282.  
  283. .PHONY: ls
  284. ls:
  285.     @echo ${DISTFILES}
  286.  
  287. .PHONY: clean distclean realclean mostlyclean
  288. clean distclean realclean mostlyclean:
  289.  
  290. .PHONY: lint
  291. lint:
  292.  
  293. .PHONY: dist-dir
  294. dist-dir:
  295.     mkdir ${DISTDIR}
  296.     for i in ${DISTFILES}; do \
  297.       ln $${i} ${DISTDIR}; \
  298.     done
  299.  
  300. # We don't have a real distclean or anything like that, but at least
  301. # we can get rid of the obj files and cvs.exe. 
  302. clean:
  303.     rm -f cvs.exe
  304.     rm -f ${srcdir}${SL}*.obj 
  305.     rm -f ${lib_dir}${SL}*.obj 
  306.     rm -f ${cvs_srcdir}${SL}*.obj 
  307.  
  308. install-cvs: cvs.exe
  309.     cp ${srcdir}${SL}cvs.exe ${install_dir}${SL}cvs.exe
  310.  
  311. %.obj: %.c
  312.     icc ${OBJ_CFLAGS} ${CFLAGS} /Fo$@ $*.c
  313.  
  314. # There seems to be no ICC option for specifying library locations, so
  315. # we must `set' the path in the compilation environment.  Urgkle. 
  316. #
  317. #         I'm having some weird problem with "\" vs. "/".  If I build
  318. # with "\" as the path separator in the makefile, the compiler dumps
  319. # core.  Go figure.  If I build with "/" as the path separator, the
  320. # object files compile fine but the linker thinks the "/" is indicating
  321. # options and gets all confused (though at least it doesn't dump core).
  322. # So, use subst to compile with "/" and link with "\".
  323. cvs.exe: ${OBJECTS}
  324.     echo Creating icc.in...
  325.     echo -Q+ -Ti+ -Fe$@ -B"/batch" -B"/NOE" > icc.in
  326.     echo $(subst /,\,$(OS2_OBJECTS))       >> icc.in
  327.     echo $(subst /,\,$(LIB_OBJECTS))       >> icc.in
  328.     echo $(subst /,\,$(COMMON_OBJECTS))    >> icc.in
  329.     echo $(subst /,\,$(ZLIB_OBJECTS))      >> icc.in
  330.     echo $(subst /,\,$(TCPIPLIB))          >> icc.in
  331.     echo $(subst /,\,$(ARGVLIB))           >> icc.in
  332.     echo Creating icc.in... done.
  333.     set LIB=$(subst /,\,$(LIB)) & icc @icc.in
  334.  
  335. # cvs.obj: ${OBJECTS} ${SOURCES} ${HEADERS}
  336.  
  337. subdir = os2
  338. Makefile: ../config.status $(srcdir)/Makefile.in
  339.     cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
  340.