123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254 |
- #
- # $Id$
- # This file is part of the Free Pascal run time library.
- # Copyright (c) 1996-98 by Michael van Canneyt
- #
- # Makefile for the Free Pascal Go32v1 Runtime Library
- #
- # See the file COPYING.FPC, included in this distribution,
- # for details about the copyright.
- #
- # This program is distributed in the hope that it will be useful,
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- #
- #####################################################################
- # Start of configurable section.
- # Please note that all these must be set in the main makefile, and
- # should be set there.
- # Don't remove the indef statements. They serve to avoid conflicts
- # with the main makefile.
- #####################################################################
- # set the directory where to install the units.
- ifndef UNITINSTALLDIR
- UNITINSTALLDIR=c:\lib\ppc\win32
- endif
- # set the directory where to install libraries
- ifndef LIBINSTALLDIR
- LIBINSTALLDIR=c:\lib
- endif
- # What is the Operating System
- ifndef OS_SRC
- OS_SRC=GO32V2
- endif
- # What is the target operating system ?
- ifndef OS_TARGET
- OS_TARGET=WIN32
- endif
- # What is the target processor :
- ifndef CPU
- CPU=i386
- #CPU=m68k
- endif
- # What compiler to use ?
- # I think ppc386 is better (it's mostly in path) (FK)
- ifndef PP
- PP=ppc386
- endif
- # What options to pass to the compiler ?
- # You may want to specify a config file or error definitions file here.
- ifndef OPT
- OPT=
- endif
- # Where is the ppumove program ?
- ifndef PPUMOVE
- PPUMOVE=ppumove
- endif
- #####################################################################
- # End of configurable section.
- # Do not edit after this line.
- #####################################################################
- #####################################################################
- # System independent
- #####################################################################
- # Where are the include files ?
- INC=../inc
- PROCINC=../$(CPU)
- CFG=../cfg
- OBJPASDIR=../objpas
- # Get some defaults for Programs and OSes.
- # This will set the following variables :
- # inlinux indos COPY REPLACE DEL INSTALL INSTALLEXE MKDIR
- # It will also set OPT for cross-compilation, and add required options.
- # also checks for config file.
- # it expects INC PROCINC to be set !!
- include $(CFG)/makefile.cfg
- # Get the system independent include file names.
- # This will set the following variables :
- # SYSINCNAMES
- include $(INC)/makefile.inc
- SYSINCDEPS=$(addprefix $(INC)/,$(SYSINCNAMES))
- # Get the processor dependent include file names.
- # This will set the following variables :
- # CPUINCNAMES
- include $(PROCINC)/makefile.cpu
- SYSCPUDEPS=$(addprefix $(PROCINC)/,$(CPUINCNAMES))
- # Put system unit dependencies together.
- SYSDEPS=$(SYSINCDEPS) $(SYSCPUDEPS)
- #####################################################################
- # System dependent
- #####################################################################
- # Determine needed extensions
- PPUEXT=.ppw
- PPLEXT=.ppl
- OEXT=.obj
- ASMEXT=.s
- LIBEXT=.a
- # Define Windows Units
- SYSTEMPPU=syswin32$(PPUEXT)
- OBJECTS=strings objpas \
- base \
- dos \
- # crt objects printer \
- cpu mmx getopts \
- # No loaders needed
- LOADERS=
- # Add Prefix and Suffixes
- OBJLOADERS=$(addsuffix $(OEXT), $(LOADERS))
- PPUOBJECTS=$(addsuffix $(PPUEXT), $(OBJECTS))
- .PHONY : all install clean \
- libs libsclean \
- diffs diffclean \
- all : $(OBJLOADERS) $(PPUOBJECTS)
- install : all
- $(MKDIR) $(UNITINSTALLDIR)
- $(INSTALL) *$(PPUEXT) *$(OEXT) $(UNITINSTALLDIR)
- clean :
- -$(DEL) *$(OEXT) *$(ASMEXT) *$(PPUEXT) *.PPS log
- #####################################################################
- # Files
- #####################################################################
- #
- # Loaders
- #
- #
- # Base Units (System, strings, os-dependent-base-unit)
- #
- $(SYSTEMPPU) : syswin32.pp $(SYSDEPS) win32.inc
- $(PP) $(OPT) -Us -Sg syswin32.pp $(REDIR)
- strings$(PPUEXT) : $(PROCINC)/strings.pp $(SYSTEMPPU)
- $(COPY) $(PROCINC)/strings.pp .
- $(PP) $(OPT) strings.pp $(REDIR)
- $(DEL) strings.pp
- #
- # Delphi Object Model
- #
- objpas$(PPUEXT) : $(OBJPASDIR)/objpas.pp $(SYSTEMPPU)
- $(COPY) $(OBJPASDIR)/objpas.pp .
- $(PP) $(OPT) objpas $(REDIR)
- $(DEL) objpas.pp
- #
- # System Dependent Units
- #
- base$(PPUEXT) : base.pp $(SYSTEMPPU)
- $(PP) $(OPT) base.pp $(REDIR)
- #
- # TP7 Compatible RTL Units
- #
- dos$(PPUEXT) : dos.pp $(INC)/filerec.inc $(INC)/textrec.inc \
- strings$(PPUEXT) $(SYSTEMPPU) win32.inc
- $(PP) $(OPT) dos $(REDIR)
- #crt$(PPUEXT) : crt.pp $(INC)/textrec.inc go32$(PPUEXT) $(SYSTEMPPU)
- # $(PP) $(OPT) crt $(REDIR)
- #objects$(PPUEXT) : objects.pp $(SYSTEMPPU)
- # $(PP) $(OPT) objects.pp $(REDIR)
- #printer$(PPUEXT) : printer.pp $(SYSTEMPPU)
- # $(PP) $(OPT) printer.pp $(REDIR)
- #
- # Other RTL Units
- #
- cpu$(PPUEXT) : $(PROCINC)/cpu.pp $(SYSTEMPPU)
- $(COPY) $(PROCINC)/cpu.pp .
- $(PP) $(OPT) cpu.pp $(REDIR)
- $(DEL) cpu.pp
- mmx$(PPUEXT) : $(PROCINC)/mmx.pp cpu$(PPUEXT) $(SYSTEMPPU)
- $(COPY) $(PROCINC)/mmx.pp .
- $(PP) $(OPT) mmx.pp $(REDIR)
- $(DEL) mmx.pp
- getopts$(PPUEXT) : $(PROCINC)/getopts.pp $(SYSTEMPPU)
- $(COPY) $(PROCINC)/getopts.pp .
- $(PP) $(OPT) getopts.pp $(REDIR)
- $(DEL) getopts.pp
- #####################################################################
- # Libs
- #####################################################################
- libs: all
- libsclean : clean
- -$(DEL) *.$(LIBEXT) *$(PPLEXT)
- #####################################################################
- # Diffs
- #####################################################################
- %.dif : %.pp
- -$(DIFF) $(DIFFOPTS) $*.pp $(REFPATH)/dos/go32v1/$*.pp > $*.dif
- %.dif : %.inc
- -$(DIFF) $(DIFFOPTS) $*.inc $(REFPATH)/dos/go32v1/$*.inc > $*.dif
- %.dif : %.as
- -$(DIFF) $(DIFFOPTS) $*.as $(REFPATH)/dos/go32v1/$*.as > $*.dif
- diffclean:
- -$(DEL) *.dif
- makefile.dif : makefile
- -$(DIFF) $(DIFFOPTS) makefile $(REFPATH)/dos/go32v1/makefile > makefile.dif
- diffs: syswin32.dif os.dif makefile.dif dos.dif base.dif struct.dif \
- winheap.dif messages.dif
- #####################################################################
- # Distribution
- #####################################################################
- distclean : clean libsclean diffclean
|