+ INitial implementation of Makefiles

This commit is contained in:
michael 1998-05-04 14:28:25 +00:00
parent a620257c5f
commit eb6b7943a9
6 changed files with 529 additions and 0 deletions

127
fcl/Makefile Normal file
View File

@ -0,0 +1,127 @@
#****************************************************************************
# Makefile for Free Component Library
# Copyright (c) 1998 by the Free Pascal Development Team
#****************************************************************************
#####################################################################
# Start of configurable section
#####################################################################
# What compiler do you want to use :
# !! If you specify a path, specify an absolute path !!
#PP=/pas/fpk/curver/ppc386
PP=ppc386
# What is your OS ?
# Possible choices : linux win32 go32v2 go32v1 os2
OS_SRC=linux
#OS_SRC=win32
#OS_SRC=go32v1
#OS_SRC=go32v2
#OS_SRC=os2
# Where do you want to install the units ?
UNITINSTALLDIR=/usr/lib/ppc/0.99.6/fcl
# UNITINSTALLDIR=\pp\units\fcl
# set target processor type
CPU=i386
# CPU=m68k
# Where is the ppumove program ? (set only if you want to make libs)
# Don't specify a relative path.
PPUMOVE=ppumove
# Set any options you wish to give to the compiler
OPT=
#######################################################################
# End of configurable section.
# Do not edit after this line.
#######################################################################
# Where are we ?
BASEDIR=$(shell pwd)
ifeq ($(findstring :,$(BASEDIR)),)
inlinux=1
endif
ifeq ($(strip $(BASEDIR)),'')
inlinux=
BASEDIR:=.
endif
# Check operating system.
ifeq ($(OS_SRC),linux)
DOS=NO
else
DOS=YES
# also redirect the standard error to the redir file
ifdef REDIR
PP:=redir -eo $(PP)
# set the verbosity to max
OPT:=$(OPT) -va
endif
endif
# Check copy delete commands.
# You need cp from GNU to handle / as directory separator
COPY=cp -p
DEL=rm
# To install programs
ifndef INSTALL
ifeq ($(DOS),YES)
INSTALL=cp
else
INSTALL=install
endif
endif
# To make a directory.
ifndef MKDIR
ifeq ($(DOS),YES)
MKDIR=mkdir
else
MKDIR=install -m 755 -d
endif
endif
# add target processor define to command line options
OPT:=$(OPT) -d$(CPU)
# Variables to export
export OS_SRC DOS SEP PP OPT REDIR COPY DEL LIBINSTALLDIR INSTALL MKDIR \
REFPATH CPU PPUMOVE UNITINSTALLDIR
.PHONY: native all linux win32 os2 go32v2 go32v1 clean install
native: $(OS_SRC)
all: linux go32v2 win32 go32v1 os2
go32v1:
$(MAKE) -C dos/go32v1
go32v2:
$(MAKE) -C dos/go32v2
linux:
$(MAKE) -C linux
os2:
$(MAKE) -C os2
win32:
$(MAKE) -C win32
clean:
$(MAKE) -C inc clean
$(MAKE) -C i386 clean
$(MAKE) -C dos/go32v2 clean
$(MAKE) -C linux clean
$(MAKE) -C os2 clean
$(MAKE) -C win32 clean
install:
$(MAKE) -C $(OS_SRC) install

99
fcl/dos/go32v2/Makefile Normal file
View File

@ -0,0 +1,99 @@
#######################################################################
# Makefile for Free Pascal
# (C) 1998 Michael van Canneyt
#######################################################################
#
# Configurable section
#
# What Compiler should we use ?
PP=ppc386
# Where are the Free Pascal units ? (Optional)
#UNITDIR = c:/pp/units/dos/go32v2
# Processor you are using
CPU=i386
#CPU=m68k
# Any options you wish to pass to the compiler
OPT=
# Where to install the units ?
UNITINSTALLDIR=c:/pp/units/fcl
# Where to install the programs ?
BININSTALLDIR=/pp/bin
# Install program ?
INSTALL=cp
# Mkdir program ?
MKDIR=mkdir
#######################################################################
# End of configurable section. Do not edit below this line.
#######################################################################
.SUFFIXES: .pp .ppu .pas
.PHONY: all install clean units progs
INCDIR=../inc
CPUDIR=../$(CPU)
include $(INCDIR)/Makefile.inc
# Set inc
$(addprefix $(INCDIR),$(INCFILENAMES))
# If nothing special needs doing, then just fill in the names here.
# The rest should be automatic.
UNITNAMES=classes
#PROGNAMES=
UNITOBJECTS=$(addsuffix .o, $(UNITNAMES))
UNITFILES=$(addsuffix .ppu, $(UNITNAMES))
PROGSOURCES=$(addsiffix .pp, $(PROGNAMES))
PROGOBJECTS=$(addsuffix .o, $(PROGNAMES))
# Adapt options. Add unit path if needed.
override OPT:=$(OPT) -I$(INCDIR) -I$(CPUDIR)
ifdef UNITDIR
override OPT:=$(OPT) -Up$(UNITDIR)
endif
# Default rule for units
.pp.ppu:
$(PP) $(OPT) $<
# Default target.
all: $(UNITFILES) $(PROGNAMES)
units: $(UNITFILES)
progs: $(PROGNAMES)
# Default rule for programs
$(PROGNAMES): %:%.pp
$(PP) $(OPT) $<
classes.ppu: classes.pp $(INCFILENAMES) $(PROCFILENAMES)
#
# Generic install and clean targets
#
install: all
$(MKDIR) $(UNITINSTALLDIR)
ifdef UNITNAMES
$(INSTALL) $(UNITNAMES) $(UNITINSTALLDIR)
endif
ifdef PROGNAMES
$(INSTALL) $(PROGNAMES) $(BININSTALLDIR)
endif
clean:
rm -f $(UNITOBJECTS) $(UNITFILES) $(PROGNAMES) $(PROGOBJECTS)
# End of makefile.

6
fcl/inc/Makefile.inc Normal file
View File

@ -0,0 +1,6 @@
#
# This makefile sets some needed variable, common to all targets
INCNAMES=classes.inc classesh.inc bits.inc collect.inc compon.inc filer.inc\
lists.inc parser.inc persist.inc reader.inc streams.inc strings.inc\
thread.inc writer.inc

99
fcl/linux/Makefile Normal file
View File

@ -0,0 +1,99 @@
#######################################################################
# Makefile for Free Pascal
# (C) 1998 Michael van Canneyt
#######################################################################
#
# Configurable section
#
# What Compiler should we use ?
PP=ppc386
# Where are the Free Pascal units ? (Optional)
# UNITDIR = /usr/lib/fpc/0.99.5/linuxunits
# Processor you are using
CPU=i386
#CPU=m68k
# Any options you wish to pass to the compiler
OPT=
# Where to install the units ?
UNITINSTALLDIR=/usr/lib/fpc/0.99.6/fcl
# Where to install the programs ?
BININSTALLDIR=/usr/local/bin
# Install program ?
INSTALL=install -m 644
# Mkdir program ?
MKDIR=install -m 755
#######################################################################
# End of configurable section. Do not edit below this line.
#######################################################################
.SUFFIXES: .pp .ppu .pas
.PHONY: all install clean units progs
INCDIR=../inc
CPUDIR=../$(CPU)
include $(INCDIR)/Makefile.inc
# Set inc
$(addprefix $(INCDIR),$(INCFILENAMES))
# If nothing special needs doing, then just fill in the names here.
# The rest should be automatic.
UNITNAMES=classes
#PROGNAMES=
UNITOBJECTS=$(addsuffix .o, $(UNITNAMES))
UNITFILES=$(addsuffix .ppu, $(UNITNAMES))
PROGSOURCES=$(addsiffix .pp, $(PROGNAMES))
PROGOBJECTS=$(addsuffix .o, $(PROGNAMES))
# Adapt options. Add unit path if needed.
override OPT:=$(OPT) -I$(INCDIR) -I$(CPUDIR)
ifdef UNITDIR
override OPT:=$(OPT) -Up$(UNITDIR)
endif
# Default rule for units
.pp.ppu:
$(PP) $(OPT) $<
# Default target.
all: $(UNITFILES) $(PROGNAMES)
units: $(UNITFILES)
progs: $(PROGNAMES)
# Default rule for programs
$(PROGNAMES): %:%.pp
$(PP) $(OPT) $<
classes.ppu: classes.pp $(INCFILENAMES) $(PROCFILENAMES)
#
# Generic install and clean targets
#
install: all
$(MKDIR) $(UNITINSTALLDIR)
ifdef UNITNAMES
$(INSTALL) $(UNITNAMES) $(UNITINSTALLDIR)
endif
ifdef PROGNAMES
$(INSTALL) $(PROGNAMES) $(BININSTALLDIR)
endif
clean:
rm -f $(UNITOBJECTS) $(UNITFILES) $(PROGNAMES) $(PROGOBJECTS)
# End of makefile.

99
fcl/os2/Makefile Normal file
View File

@ -0,0 +1,99 @@
#######################################################################
# Makefile for Free Pascal
# (C) 1998 Michael van Canneyt
#######################################################################
#
# Configurable section
#
# What Compiler should we use ?
PP=ppc386
# Where are the Free Pascal units ? (Optional)
#UNITDIR = c:/pp/units/os2
# Processor you are using
CPU=i386
#CPU=m68k
# Any options you wish to pass to the compiler
OPT=
# Where to install the units ?
UNITINSTALLDIR=c:/pp/units/fcl
# Where to install the programs ?
BININSTALLDIR=/pp/bin
# Install program ?
INSTALL=cp
# Mkdir program ?
MKDIR=mkdir
#######################################################################
# End of configurable section. Do not edit below this line.
#######################################################################
.SUFFIXES: .pp .ppu .pas
.PHONY: all install clean units progs
INCDIR=../inc
CPUDIR=../$(CPU)
include $(INCDIR)/Makefile.inc
# Set inc
$(addprefix $(INCDIR),$(INCFILENAMES))
# If nothing special needs doing, then just fill in the names here.
# The rest should be automatic.
UNITNAMES=classes
#PROGNAMES=
UNITOBJECTS=$(addsuffix .o, $(UNITNAMES))
UNITFILES=$(addsuffix .ppu, $(UNITNAMES))
PROGSOURCES=$(addsiffix .pp, $(PROGNAMES))
PROGOBJECTS=$(addsuffix .o, $(PROGNAMES))
# Adapt options. Add unit path if needed.
override OPT:=$(OPT) -I$(INCDIR) -I$(CPUDIR)
ifdef UNITDIR
override OPT:=$(OPT) -Up$(UNITDIR)
endif
# Default rule for units
.pp.ppu:
$(PP) $(OPT) $<
# Default target.
all: $(UNITFILES) $(PROGNAMES)
units: $(UNITFILES)
progs: $(PROGNAMES)
# Default rule for programs
$(PROGNAMES): %:%.pp
$(PP) $(OPT) $<
classes.ppu: classes.pp $(INCFILENAMES) $(PROCFILENAMES)
#
# Generic install and clean targets
#
install: all
$(MKDIR) $(UNITINSTALLDIR)
ifdef UNITNAMES
$(INSTALL) $(UNITNAMES) $(UNITINSTALLDIR)
endif
ifdef PROGNAMES
$(INSTALL) $(PROGNAMES) $(BININSTALLDIR)
endif
clean:
rm -f $(UNITOBJECTS) $(UNITFILES) $(PROGNAMES) $(PROGOBJECTS)
# End of makefile.

99
fcl/win32/Makefile Normal file
View File

@ -0,0 +1,99 @@
#######################################################################
# Makefile for Free Pascal
# (C) 1998 Michael van Canneyt
#######################################################################
#
# Configurable section
#
# What Compiler should we use ?
PP=ppc386
# Where are the Free Pascal units ? (Optional)
#UNITDIR = c:/pp/units/win32
# Processor you are using
CPU=i386
#CPU=m68k
# Any options you wish to pass to the compiler
OPT=
# Where to install the units ?
UNITINSTALLDIR=c:/pp/units/fcl
# Where to install the programs ?
BININSTALLDIR=/pp/bin
# Install program ?
INSTALL=cp
# Mkdir program ?
MKDIR=mkdir
#######################################################################
# End of configurable section. Do not edit below this line.
#######################################################################
.SUFFIXES: .pp .ppu .pas
.PHONY: all install clean units progs
INCDIR=../inc
CPUDIR=../$(CPU)
include $(INCDIR)/Makefile.inc
# Set inc
$(addprefix $(INCDIR),$(INCFILENAMES))
# If nothing special needs doing, then just fill in the names here.
# The rest should be automatic.
UNITNAMES=classes
#PROGNAMES=
UNITOBJECTS=$(addsuffix .o, $(UNITNAMES))
UNITFILES=$(addsuffix .ppu, $(UNITNAMES))
PROGSOURCES=$(addsiffix .pp, $(PROGNAMES))
PROGOBJECTS=$(addsuffix .o, $(PROGNAMES))
# Adapt options. Add unit path if needed.
override OPT:=$(OPT) -I$(INCDIR) -I$(CPUDIR)
ifdef UNITDIR
override OPT:=$(OPT) -Up$(UNITDIR)
endif
# Default rule for units
.pp.ppu:
$(PP) $(OPT) $<
# Default target.
all: $(UNITFILES) $(PROGNAMES)
units: $(UNITFILES)
progs: $(PROGNAMES)
# Default rule for programs
$(PROGNAMES): %:%.pp
$(PP) $(OPT) $<
classes.ppu: classes.pp $(INCFILENAMES) $(PROCFILENAMES)
#
# Generic install and clean targets
#
install: all
$(MKDIR) $(UNITINSTALLDIR)
ifdef UNITNAMES
$(INSTALL) $(UNITNAMES) $(UNITINSTALLDIR)
endif
ifdef PROGNAMES
$(INSTALL) $(PROGNAMES) $(BININSTALLDIR)
endif
clean:
rm -f $(UNITOBJECTS) $(UNITFILES) $(PROGNAMES) $(PROGOBJECTS)
# End of makefile.