fpc/ide/Makefile
1999-12-23 19:43:59 +00:00

339 lines
6.2 KiB
Makefile

#
# Makefile generated by fpcmake v0.99.13 on 1999-12-23 20:20
#
defaultrule: all
#####################################################################
# Autodetect OS (Linux or Dos or Windows NT)
# define inlinux when running under linux
# define inWinNT when running under WinNT
#####################################################################
# We need only / in the path
override PATH:=$(subst \,/,$(PATH))
# Search for PWD and determine also if we are under linux
PWD:=$(strip $(wildcard $(addsuffix /pwd.exe,$(subst ;, ,$(PATH)))))
ifeq ($(PWD),)
PWD:=$(strip $(wildcard $(addsuffix /pwd,$(subst :, ,$(PATH)))))
ifeq ($(PWD),)
nopwd:
@echo You need the GNU utils package to use this Makefile!
@echo Get ftp://ftp.freepascal.org/pub/fpc/dist/go32v2/utilgo32.zip
@exit
else
inlinux=1
endif
else
PWD:=$(firstword $(PWD))
endif
# Detect NT - NT sets OS to Windows_NT
ifndef inlinux
ifeq ($(OS),Windows_NT)
inWinNT=1
endif
endif
# Detect OS/2 - OS/2 has OS2_SHELL defined
ifndef inlinux
ifndef inWinNT
ifdef OS2_SHELL
inOS2=1
endif
endif
endif
# The extension of executables
ifdef inlinux
EXEEXT=
else
EXEEXT=.exe
endif
# The path which is search separated by spaces
ifdef inlinux
SEARCHPATH=$(subst :, ,$(PATH))
else
SEARCHPATH=$(subst ;, ,$(PATH))
endif
#####################################################################
# FPC version/target Detection
#####################################################################
# What compiler to use ?
ifndef FPC
# Compatibility with old makefiles
ifdef PP
export FPC=$(PP)
else
ifdef inOS2
export FPC=ppos2$(EXEEXT)
else
export FPC=ppc386$(EXEEXT)
endif
endif
endif
# Target OS
ifndef OS_TARGET
export OS_TARGET:=$(shell $(FPC) -iTO)
endif
# Source OS
ifndef OS_SOURCE
export OS_SOURCE:=$(shell $(FPC) -iSO)
endif
# Target CPU
ifndef CPU_TARGET
export CPU_TARGET:=$(shell $(FPC) -iTP)
endif
# Source CPU
ifndef CPU_SOURCE
export CPU_SOURCE:=$(shell $(FPC) -iSP)
endif
# FPC version
ifndef FPC_VERSION
export FPC_VERSION:=$(shell $(FPC) -iV)
endif
#####################################################################
# Default Settings
#####################################################################
# Release ? Then force OPT and don't use extra opts via commandline
ifndef REDIRFILE
REDIRFILE=log
endif
ifdef RELEASE
override OPT:=-Xs -OG2p3 -n
endif
# Verbose settings (warning,note,info)
ifdef VERBOSE
override OPT+=-vwni
endif
ifdef REDIR
ifndef inlinux
override FPC=redir -eo $(FPC)
endif
# set the verbosity to max
override OPT+=-va
override REDIR:= >> $(REDIRFILE)
endif
#####################################################################
# User Settings
#####################################################################
# Targets
override DIROBJECTS+=$(wildcard fake text)
# Clean
# Install
ZIPTARGET=install
# Defaults
# Directories
ifndef PACKAGEDIR
PACKAGEDIR=$(FPCDIR)/packages
endif
ifndef COMPONENTDIR
COMPONENTDIR=$(FPCDIR)/components
endif
# Packages
# Libraries
#####################################################################
# Standard rules
#####################################################################
debug: $(addsuffix _debug,$(DIROBJECTS))
examples: $(addsuffix _examples,$(DIROBJECTS))
test: $(addsuffix _test,$(DIROBJECTS))
smart: $(addsuffix _smart,$(DIROBJECTS))
shared: $(addsuffix _shared,$(DIROBJECTS))
showinstall: $(addsuffix _showinstall,$(DIROBJECTS))
install: $(addsuffix _install,$(DIROBJECTS))
sourceinstall: $(addsuffix _sourceinstall,$(DIROBJECTS))
clean: $(addsuffix _clean,$(DIROBJECTS))
cleanall: $(addsuffix _cleanall,$(DIROBJECTS))
depend: $(addsuffix _depend,$(DIROBJECTS))
.PHONY: debug examples test smart shared showinstall install sourceinstall clean cleanall depend
#####################################################################
# Package depends
#####################################################################
ifneq ($(wildcard $(RTLDIR)),)
ifeq ($(wildcard $(RTLDIR)/$(FPCMADE)),)
override COMPILEPACKAGES+=rtl
rtl_package:
$(MAKE) -C $(RTLDIR) all
endif
endif
.PHONY: rtl_package
# Target Dirs
OBJECTDIRFAKE=1
OBJECTDIRTEXT=1
# Dir fake
ifdef OBJECTDIRFAKE
.PHONY: fake_all fake_debug fake_examples fake_test fake_smart fake_shared fake_showinstall fake_install fake_sourceinstall fake_zipinstall fake_zipinstalladd fake_clean fake_cleanall fake_depend fake_info
fake_all:
$(MAKE) -C fake all
fake_debug:
$(MAKE) -C fake debug
fake_examples:
$(MAKE) -C fake examples
fake_test:
$(MAKE) -C fake test
fake_smart:
$(MAKE) -C fake smart
fake_shared:
$(MAKE) -C fake shared
fake_showinstall:
$(MAKE) -C fake showinstall
fake_install:
$(MAKE) -C fake install
fake_sourceinstall:
$(MAKE) -C fake sourceinstall
fake_zipinstall:
$(MAKE) -C fake zipinstall
fake_zipinstalladd:
$(MAKE) -C fake zipinstalladd
fake_clean:
$(MAKE) -C fake clean
fake_cleanall:
$(MAKE) -C fake cleanall
fake_depend:
$(MAKE) -C fake depend
fake_info:
$(MAKE) -C fake info
endif
# Dir text
ifdef OBJECTDIRTEXT
.PHONY: text_all text_debug text_examples text_test text_smart text_shared text_showinstall text_install text_sourceinstall text_zipinstall text_zipinstalladd text_clean text_cleanall text_depend text_info
text_all:
$(MAKE) -C text all
text_debug:
$(MAKE) -C text debug
text_examples:
$(MAKE) -C text examples
text_test:
$(MAKE) -C text test
text_smart:
$(MAKE) -C text smart
text_shared:
$(MAKE) -C text shared
text_showinstall:
$(MAKE) -C text showinstall
text_install:
$(MAKE) -C text install
text_sourceinstall:
$(MAKE) -C text sourceinstall
text_zipinstall:
$(MAKE) -C text zipinstall
text_zipinstalladd:
$(MAKE) -C text zipinstalladd
text_clean:
$(MAKE) -C text clean
text_cleanall:
$(MAKE) -C text cleanall
text_depend:
$(MAKE) -C text depend
text_info:
$(MAKE) -C text info
endif
#####################################################################
# Users rules
#####################################################################
.PHONY: gdb full fullgdb clean_compiler
all:
$(MAKE) -C text all
gdb:
$(MAKE) -C text all GDB=1
full:
$(MAKE) -C text all FULL=1 "NEEDOPT+=-Sg -dGDB -dBROWSERCOL"
fullgdb:
$(MAKE) -C text all FULL=1 GDB=1 "NEEDOPT+=-Sg -dGDB -dBROWSERCOL"
#
# Misc
#
clean_compiler:
make -C ../../compiler clean