home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / MISC / GNU / MAK358AS.ZIP / MAKEFILE < prev    next >
Encoding:
Text File  |  1992-02-22  |  5.0 KB  |  166 lines

  1. ## Copyright (C) 1988, 1989 Free Software Foundation, Inc.
  2. # This file is part of GNU Make.
  3. # GNU Make is free software; you can redistribute it and/or modify
  4. # it under the terms of the GNU General Public License as published by
  5. # the Free Software Foundation; either version 1, or (at your option)
  6. # any later version.
  7. #
  8. # GNU Make is distributed in the hope that it will be useful,
  9. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  11. # GNU General Public License for more details.
  12. # You should have received a copy of the GNU General Public License
  13. # along with GNU Make; see the file COPYING.  If not, write to
  14. # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  15.  
  16. # MS-DOS port (c) 1990 by Thorsten Ohl <ohl@gnu.ai.mit.edu>
  17. #
  18. # To this port, the same copying conditions apply as to the
  19. # original release.
  20. #
  21. # IMPORTANT:
  22. # This file is not identical to the original GNU release!
  23. # You should have received this code as patch to the official
  24. # GNU release.
  25. #
  26. # MORE IMPORTANT:
  27. # This port comes with ABSOLUTELY NO WARRANTY.
  28. #
  29. # $Header: e:/gnu/make/RCS/makefile.'v 3.58.0.9 90/07/23 23:17:36 tho Exp $
  30.  
  31. #
  32. #    Makefile for GNU Make
  33. #
  34.  
  35. VPATH    = d:/usr/lib;d:/usr/include
  36. BINDIR    = c:/bin
  37.  
  38. #BUILD = debug
  39. BUILD = production
  40.  
  41. ifeq ($(BUILD),debug)
  42.  
  43. defines = -DUSG -DNO_LDAV -DNO_FLOAT -DSTDC_HEADERS -DSMART_SHELL -DUSE_XMS
  44.  
  45. CFLAGS    = $(defines) -FPa -AL -Od -Zi -W4
  46. CRIPPLED_CFLAGS = $(CFLAGS)
  47. LDFLAGS = /st:0x8000/map/noe/co
  48.  
  49. else
  50.  
  51. CFLAGS    = $(defines) -FPa -AL -Ox -W4
  52. CRIPPLED_CFLAGS = $(defines) -FPa -AL -Od -W4
  53. LDFLAGS = /st:0x8000/map/noe/e
  54.  
  55. endif
  56.   
  57. # MS-DOS specific files (not in the GNU distribution)
  58. DOSOBJ    = msd_dir.obj _cwild.obj zipscan.obj
  59. DOSSRC    = msd_dir.c _cwild.c zipscan.c
  60. DOSINC    = msd_dir.h
  61. SWAPLIB    = swaplibl.lib
  62. SWAPOBJ    = swap.obj
  63. SWAPSRC    = swap.c
  64. SWAPINC    = swaplib.h
  65.  
  66. # If you don't want archive support, comment these out.
  67. ARCHIVES = ar.obj zipscan.obj
  68. ARCHIVES_SRC = ar.c zipscan.c
  69.  
  70. objs  = $(swapobj) glob.obj commands.obj job.obj dir.obj file.obj load.obj \
  71.         misc.obj main.obj read.obj remake.obj remote.obj rule.obj \
  72.         implicit.obj default.obj variable.obj expand.obj function.obj \
  73.         vpath.obj $(ARCHIVES) $(extras)
  74. srcs  = $(swapsrc) glob.c commands.c job.c dir.c file.c load.c misc.c \
  75.         main.c read.c remake.c remote.c rule.c implicit.c default.c \
  76.         variable.c expand.c function.c vpath.c version.c $(ARCHIVES_SRC)
  77. incs  =    commands.h dep.h file.h job.h make.h rule.h variable.h msd_dir.h
  78.  
  79. DISTSRC    = $(DISTOBJ:.obj=.c) remote-s.c version.c
  80. DISTINC    = commands.h dep.h file.h job.h make.h rule.h variable.h
  81.  
  82. # Preserve the ordering of object files!
  83. # swap spawn ...
  84. OBJS    = $(SWAPOBJ) $(DISTOBJ) $(AROBJ) $(DOSOBJ)
  85. SRCS    = $(DISTSRC) $(ARSRC) $(DOSSRC)
  86. INCS    = $(DISTINC) $(ARINC) $(DOSINC)
  87.  
  88. # Files for backup and patches:
  89. RCSFILES= $(patsubst %, RCS/%'v, $(SRCS) $(INCS)) RCS/makefile.'v
  90. MISC    = projects ChangeLog makepat mkpatch readme.dos make.dos
  91. DISTFILES = $(patsubst %, dist/%, $(DISTSRC) $(ARSRC) $(DISTINC) $(ARINC))
  92. DOSFILES = $(patsubst %, dos/%, $(SRCS) $(INCS) makefile)
  93.  
  94. DISK = b:
  95. ZIPFILE    = gnumake.zip
  96.  
  97. all: gnumake.exe
  98.  
  99. gnumake.exe: $(objs) version.c
  100.     $(CC) $(CFLAGS) -c version.c
  101.     $(LINK) $(LDFLAGS) $(OBJS) version setargv,$@,gnumake.map,$(SWAPLIB),
  102.  
  103. # Well, here optimization is dangerous... (inline assembler etc.)
  104. swap.obj: swap.c
  105.     $(CC) $(CRIPPLED_CFLAGS) -c $<
  106.  
  107. # MSC 6.0 bombs with `-Ox'
  108. main.obj : main.c make.h commands.h dep.h file.h variable.h job.h $(SWAPINC)
  109.     $(CC) $(CRIPPLED_CFLAGS) -c $<
  110.  
  111. # debugging
  112. swap.exe: swap.c spawn.c
  113.     $(CC) $(CRIPPLED_CFLAGS) -DTEST -Zi -Fe$@ swap.c spawn.c
  114.     rm -f swap.obj spawn.obj
  115.  
  116. tags: $(srcs) $(srcs2) $(srcs3) $(incs)
  117.     etags  *.c *.h
  118.  
  119. install: $(BINDIR)/make.exe
  120.  
  121. $(BINDIR)/make.exe:gnumake.exe
  122.     $(INSTALL) $< $@
  123.  
  124. clean:
  125.     rm -f *.obj *.map tags errs
  126.     rcsclean *.c *.h makefile
  127.  
  128. zip: $(ZIPFILE)
  129.  
  130. disk: $(DISK)/$(ZIPFILE)
  131.  
  132. $(ZIPFILE): $(RCSFILES) $(MISC)
  133.     pkzip -frp $@
  134.  
  135. $(DISK)/$(ZIPFILE): $(ZIPFILE)
  136.     cp $< $@
  137.     pkunzip -t $@ | grep -vw OK
  138.  
  139. # Dependencies:
  140.  
  141. ar.obj: make.h file.h
  142. commands.obj: make.h dep.h commands.h file.h variable.h job.h
  143. default.obj: make.h rule.h dep.h file.h commands.h variable.h
  144. dir.obj: make.h msd_dir.h
  145. expand.obj: make.h commands.h file.h variable.h
  146. file.obj: make.h commands.h dep.h file.h variable.h
  147. function.obj: make.h variable.h dep.h commands.h job.h $(SWAPINC)
  148. glob.obj: msd_dir.h
  149. implicit.obj: make.h rule.h dep.h file.h
  150. job.obj: make.h commands.h job.h file.h variable.h $(SWAPINC)
  151. load.obj: make.h commands.h job.h
  152. misc.obj: make.h dep.h
  153. msd_dir.obj: msd_dir.h
  154. read.obj: make.h commands.h dep.h file.h variable.h
  155. remake.obj: make.h commands.h job.h dep.h file.h
  156. remote.obj: remote-s.c make.h commands.h
  157. rule.obj: make.h commands.h dep.h file.h variable.h rule.h
  158. variable.obj: make.h commands.h variable.h dep.h file.h
  159. vpath.obj: make.h file.h variable.h
  160.  
  161.  
  162.  
  163.  
  164.