2 # Makefile generated by fpcmake v1.00 [2000/12/19]
7 #####################################################################
8 # Autodetect OS (Linux or Dos or Windows NT or OS/2)
9 # define inUnix when running under Unix (Linux,FreeBSD)
10 # define inWinNT when running under WinNT
11 # define inOS2 when running under OS/2
12 #####################################################################
14 # We need only / in the path
15 override PATH
:=$(subst \
,/,$(PATH
))
17 # Search for PWD and determine also if we are under linux
18 PWD
:=$(strip $(wildcard $(addsuffix /pwd.exe
,$(subst ;, ,$(PATH
)))))
20 PWD
:=$(strip $(wildcard $(addsuffix /pwd
,$(subst :, ,$(PATH
)))))
23 @echo You need the GNU utils package to use this Makefile
!
24 @echo Get ftp
://ftp.freepascal.org
/pub
/fpc
/dist/go32v2
/utilgo32.zip
28 PWD
:=$(firstword $(PWD
))
31 PWD
:=$(firstword $(PWD
))
34 # Detect NT - NT sets OS to Windows_NT
35 # Detect OS/2 - OS/2 has OS2_SHELL defined
37 ifeq ($(OS
),Windows_NT
)
46 # The extension of executables
53 # The path which is searched separated by spaces
55 SEARCHPATH
=$(subst :, ,$(PATH
))
57 SEARCHPATH
=$(subst ;, ,$(PATH
))
62 BASEDIR
:=$(shell $(PWD
))
67 #####################################################################
68 # FPC version/target Detection
69 #####################################################################
71 # What compiler to use ?
73 # Compatibility with old makefiles
80 override FPC
:=$(subst $(SRCEXEEXT
),,$(FPC
))
81 override FPC
:=$(subst \
,/,$(FPC
))$(SRCEXEEXT
)
85 OS_TARGET
:=$(shell $(FPC
) -iTO
)
90 OS_SOURCE
:=$(shell $(FPC
) -iSO
)
95 CPU_TARGET
:=$(shell $(FPC
) -iTP
)
100 CPU_SOURCE
:=$(shell $(FPC
) -iSP
)
105 FPC_VERSION
:=$(shell $(FPC
) -iV
)
108 export FPC OS_TARGET OS_SOURCE CPU_TARGET CPU_SOURCE FPC_VERSION
110 #####################################################################
112 #####################################################################
114 # Test FPCDIR to look if the RTL dir exists
116 override FPCDIR
:=$(subst \
,/,$(FPCDIR
))
117 ifeq ($(wildcard $(FPCDIR
)/rtl
),)
118 ifeq ($(wildcard $(FPCDIR
)/units
),)
119 override FPCDIR
=wrong
123 override FPCDIR
=wrong
127 ifeq ($(FPCDIR
),wrong
)
129 ifeq ($(wildcard $(FPCDIR
)/rtl
),)
130 ifeq ($(wildcard $(FPCDIR
)/units
),)
131 override FPCDIR
=wrong
137 ifeq ($(FPCDIR
),wrong
)
139 override FPCDIR
=/usr
/local
/lib
/fpc
/$(FPC_VERSION
)
140 ifeq ($(wildcard $(FPCDIR
)/units
),)
141 override FPCDIR
=/usr
/lib
/fpc
/$(FPC_VERSION
)
144 override FPCDIR
:=$(subst /$(FPC
),,$(firstword $(strip $(wildcard $(addsuffix /$(FPC
),$(SEARCHPATH
))))))
145 override FPCDIR
:=$(FPCDIR
)/..
146 ifeq ($(wildcard $(FPCDIR
)/rtl
),)
147 ifeq ($(wildcard $(FPCDIR
)/units
),)
148 override FPCDIR
:=$(FPCDIR
)/..
149 ifeq ($(wildcard $(FPCDIR
)/rtl
),)
150 ifeq ($(wildcard $(FPCDIR
)/units
),)
151 override FPCDIR
=c
:/pp
159 #####################################################################
161 #####################################################################
166 override DIROBJECTS
+=$(wildcard text graph
)
167 ifeq ($(OS_TARGET
),linux
)
168 override DIROBJECTS
+=$(wildcard linux
)
170 ifeq ($(OS_TARGET
),go32v2
)
171 override DIROBJECTS
+=$(wildcard modex
)
173 ifeq ($(OS_TARGET
),win32
)
174 override DIROBJECTS
+=$(wildcard win32
)
200 #####################################################################
202 #####################################################################
206 ECHO
:=$(strip $(wildcard $(addsuffix /gecho
$(EXEEXT
),$(SEARCHPATH
))))
208 ECHO
:=$(strip $(wildcard $(addsuffix /echo
$(SRCEXEEXT
),$(SEARCHPATH
))))
213 ECHO
:=$(firstword $(ECHO
))
217 ECHO
:=$(firstword $(ECHO
))
237 # Check delete program
242 # Check deltree program
250 INSTALL
:=install -c
-m
644
256 # To install programs
259 INSTALLEXE
:=install -c
-m
755
265 # To make a directory.
268 MKDIR
:=install -m
755 -d
270 MKDIR
:=ginstall
-m
755 -d
274 export ECHO ECHOE COPY COPYTREE MOVE DEL DELTREE INSTALL INSTALLEXE MKDIR
276 #####################################################################
278 #####################################################################
280 # assembler, redefine it if cross compiling
285 # linker, but probably not used
301 # ldconfig to rebuild .so cache
310 PPUMOVE
:=$(strip $(wildcard $(addsuffix /ppumove
$(SRCEXEEXT
),$(SEARCHPATH
))))
314 PPUMOVE
:=$(firstword $(PPUMOVE
))
321 PPUFILES
:=$(strip $(wildcard $(addsuffix /ppufiles
$(SRCEXEEXT
),$(SEARCHPATH
))))
325 PPUFILES
:=$(firstword $(PPUFILES
))
330 # Look if UPX is found for go32v2 and win32. We can't use $UPX becuase
331 # upx uses that one itself (PFV)
333 ifeq ($(OS_TARGET
),go32v2
)
336 ifeq ($(OS_TARGET
),win32
)
340 UPXPROG
:=$(strip $(wildcard $(addsuffix /upx
$(SRCEXEEXT
),$(SEARCHPATH
))))
344 UPXPROG
:=$(firstword $(UPXPROG
))
352 # ZipProg, you can't use Zip as the var name (PFV)
354 ZIPPROG
:=$(strip $(wildcard $(addsuffix /zip
$(SRCEXEEXT
),$(SEARCHPATH
))))
358 ZIPPROG
:=$(firstword $(ZIPPROG
))
368 TARPROG
:=$(strip $(wildcard $(addsuffix /tar$(SRCEXEEXT
),$(SEARCHPATH
))))
372 TARPROG
:=$(firstword $(TARPROG
))
385 #####################################################################
387 #####################################################################
389 # Default needed extensions (Go32v2,Linux)
403 ifeq ($(OS_TARGET
),go32v1
)
414 ifeq ($(OS_TARGET
),go32v2
)
419 ifeq ($(OS_TARGET
),linux
)
426 ifeq ($(OS_TARGET
),freebsd
)
429 FPCMADE
=fpcmade.freebsd
433 ifeq ($(OS_TARGET
),win32
)
444 ifeq ($(OS_TARGET
),os2
)
456 ifeq ($(OS_TARGET
),go32v2
)
459 ifeq ($(OS_TARGET
),go32v1
)
463 # determine which .pas extension is used
466 override TESTPAS
:=$(strip $(wildcard $(addsuffix .pas
,$(firstword $(EXEOBJECTS
)))))
468 override TESTPAS
:=$(strip $(wildcard $(addsuffix .pas
,$(firstword $(UNITOBJECTS
)))))
479 #####################################################################
480 # Default Directories
481 #####################################################################
483 # Linux and freebsd use unix dirs with /usr/bin, /usr/lib
484 # When zipping use the target as default, when normal install then
485 # use the source os as default
488 ifeq ($(OS_TARGET
),linux
)
491 ifeq ($(OS_TARGET
),freebsd
)
496 ifeq ($(OS_SOURCE
),linux
)
499 ifeq ($(OS_SOURCE
),freebsd
)
504 # set the prefix directory where to install everything
505 ifndef PREFIXINSTALLDIR
507 PREFIXINSTALLDIR
=/usr
512 export PREFIXINSTALLDIR
514 # Where to place the resulting zip files
516 DESTZIPDIR
:=$(BASEDIR
)
520 #####################################################################
521 # Install Directories
522 #####################################################################
524 # set the base directory where to install everything
525 ifndef BASEINSTALLDIR
527 BASEINSTALLDIR
=$(PREFIXINSTALLDIR
)/lib
/fpc
/$(FPC_VERSION
)
529 BASEINSTALLDIR
=$(PREFIXINSTALLDIR
)
533 # set the directory where to install the binaries
536 BININSTALLDIR
=$(PREFIXINSTALLDIR
)/bin
538 BININSTALLDIR
=$(BASEINSTALLDIR
)/bin
/$(OS_TARGET
)
542 # set the directory where to install the units.
543 ifndef UNITINSTALLDIR
544 UNITINSTALLDIR
=$(BASEINSTALLDIR
)/units
/$(OS_TARGET
)
546 UNITINSTALLDIR
:=$(UNITINSTALLDIR
)/$(UNITSUBDIR
)
550 # Where to install shared libraries
553 LIBINSTALLDIR
=$(PREFIXINSTALLDIR
)/lib
555 LIBINSTALLDIR
=$(UNITINSTALLDIR
)
559 # Where the source files will be stored
560 ifndef SOURCEINSTALLDIR
562 SOURCEINSTALLDIR
=$(PREFIXINSTALLDIR
)/src
/fpc-
$(FPC_VERSION
)
564 SOURCEINSTALLDIR
=$(BASEINSTALLDIR
)/source
567 SOURCEINSTALLDIR
:=$(SOURCEINSTALLDIR
)/$(SOURCESUBDIR
)
571 # Where the doc files will be stored
574 DOCINSTALLDIR
=$(PREFIXINSTALLDIR
)/doc
/fpc-
$(FPC_VERSION
)
576 DOCINSTALLDIR
=$(BASEINSTALLDIR
)/doc
580 # Where to install the examples, under linux we use the doc dir
581 # because the copytree command will create a subdir itself
582 ifndef EXAMPLEINSTALLDIR
584 EXAMPLEINSTALLDIR
=$(DOCINSTALLDIR
)/examples
586 EXAMPLEINSTALLDIR
=$(BASEINSTALLDIR
)/examples
589 EXAMPLEINSTALLDIR
:=$(EXAMPLEINSTALLDIR
)/$(EXAMPLESUBDIR
)
593 # Where the some extra (data)files will be stored
594 ifndef DATAINSTALLDIR
595 DATAINSTALLDIR
=$(BASEINSTALLDIR
)
598 #####################################################################
600 #####################################################################
608 override FPC
=redir
-eo
$(FPC
)
610 # set the verbosity to max
612 override REDIR
:= >> $(REDIRFILE
)
616 #####################################################################
617 # Compiler Command Line
618 #####################################################################
620 # Load commandline OPTDEF and add FPC_CPU define
621 override FPCOPTDEF
:=-d
$(CPU_TARGET
)
623 # Load commandline OPT and add target and unit dir to be sure
624 ifneq ($(OS_TARGET
),$(OS_SOURCE
))
625 override FPCOPT
+=-T
$(OS_TARGET
)
628 # User dirs should be first, so they are looked at first
630 override FPCOPT
+=$(addprefix -Fu
,$(UNITDIR
))
633 override FPCOPT
+=$(addprefix -Fl
,$(LIBDIR
))
636 override FPCOPT
+=$(addprefix -Fo
,$(OBJDIR
))
639 override FPCOPT
+=$(addprefix -Fi
,$(INCDIR
))
647 # Smartlinking creation
654 override FPCOPT
+=-gl
-dDEBUG
657 # Release mode (strip, optimize and don't load ppc386.cfg)
658 # 0.99.12b has a bug in the optimizer so don't use it by default
660 ifeq ($(FPC_VERSION
),0.99.12)
661 override FPCOPT
+=-Xs
-OGp3
-n
663 override FPCOPT
+=-Xs
-OG2p3
-n
674 override FPCOPT
+=-OG2p3
677 # Verbose settings (warning,note,info)
679 override FPCOPT
+=-vwni
683 override FPCOPT
+=-Fu
$(UNITSDIR
)
686 # Target dirs and the prefix to use for clean/install
688 override FPCOPT
+=-FE
$(TARGETDIR
)
689 ifeq ($(TARGETDIR
),.
)
690 override TARGETDIRPREFIX
=
692 override TARGETDIRPREFIX
=$(TARGETDIR
)/
696 override FPCOPT
+=-FU
$(UNITTARGETDIR
)
697 ifeq ($(UNITTARGETDIR
),.
)
698 override UNITTARGETDIRPREFIX
=
700 override UNITTARGETDIRPREFIX
=$(TARGETDIR
)/
704 override UNITTARGETDIR
=$(TARGETDIR
)
705 override UNITTARGETDIRPREFIX
=$(TARGETDIRPREFIX
)
709 # Add commandline options last so they can override
711 override FPCOPT
+=$(OPT
)
714 # Add defines from FPCOPTDEF to FPCOPT
716 override FPCOPT
+=$(FPCOPTDEF
)
721 override FPCOPT
+=-Fr
$(ERRORFILE
)
724 # Was a config file specified ?
726 override FPCOPT
+=@
$(CFGFILE
)
729 # For win32 the options are passed using the environment FPCEXTCMD
730 ifeq ($(OS_SOURCE
),win32
)
731 override FPCEXTCMD
:=$(FPCOPT
)
732 override FPCOPT
:=!FPCEXTCMD
736 # Compiler commandline
737 override COMPILER
:=$(FPC
) $(FPCOPT
)
739 # also call ppas if with command option -s
740 # but only if the OS_SOURCE and OS_TARGE are equal
741 ifeq (,$(findstring -s
,$(COMPILER
)))
744 ifeq ($(OS_SOURCE
),$(OS_TARGET
))
749 #####################################################################
751 #####################################################################
753 all: fpc_all
$(addsuffix _all
,$(DIROBJECTS
))
755 debug
: fpc_debug
$(addsuffix _debug
,$(DIROBJECTS
))
757 smart
: fpc_smart
$(addsuffix _smart
,$(DIROBJECTS
))
759 shared
: fpc_shared
$(addsuffix _shared
,$(DIROBJECTS
))
761 showinstall
: fpc_showinstall
$(addsuffix _showinstall
,$(DIROBJECTS
))
763 install: fpc_install
$(addsuffix _install
,$(DIROBJECTS
))
765 sourceinstall
: fpc_sourceinstall
767 exampleinstall
: fpc_exampleinstall
769 zipinstall
: fpc_zipinstall
771 zipsourceinstall
: fpc_zipsourceinstall
773 zipexampleinstall
: fpc_zipexampleinstall
775 clean: fpc_clean
$(addsuffix _clean
,$(DIROBJECTS
))
777 distclean: fpc_distclean
$(addsuffix _distclean
,$(DIROBJECTS
))
779 cleanall
: fpc_cleanall
$(addsuffix _cleanall
,$(DIROBJECTS
))
781 require
: $(addsuffix _require
,$(DIROBJECTS
))
783 .PHONY
: all debug smart shared showinstall
install sourceinstall exampleinstall zipinstall zipsourceinstall zipexampleinstall
clean distclean cleanall require
785 #####################################################################
786 # General compile rules
787 #####################################################################
789 .PHONY
: fpc_packages fpc_all fpc_debug
791 $(FPCMADE
): $(ALLTARGET
)
792 @
$(ECHO
) Compiled
> $(FPCMADE
)
794 fpc_packages
: $(COMPILEPACKAGES
)
796 fpc_all
: fpc_packages
$(FPCMADE
)
801 # Search paths for .ppu if targetdir is set
803 vpath
%$(PPUEXT
) $(UNITTARGETDIR
)
806 # General compile rules, available for both possible PASEXT
808 .SUFFIXES
: $(EXEEXT
) $(PPUEXT
) $(OEXT
) .pas .pp
811 $(COMPILER
) $< $(REDIR
)
815 $(COMPILER
) $< $(REDIR
)
819 $(COMPILER
) $< $(REDIR
)
823 $(COMPILER
) $< $(REDIR
)
826 #####################################################################
828 #####################################################################
830 .PHONY
: fpc_smart fpc_shared
833 LIBFULLNAME
=$(LIBNAME
).
$(LIBVERSION
)
835 LIBFULLNAME
=$(LIBNAME
)
838 # Default sharedlib units are all unit objects
839 ifndef SHAREDLIBUNITOBJECTS
840 SHAREDLIBUNITOBJECTS
:=$(UNITOBJECTS
)
844 $(MAKE
) all LINKSMART
=1 CREATESMART
=1
849 @
$(ECHO
) "LIBNAME not set"
851 $(PPUMOVE
) $(SHAREDLIBUNITOBJECTS
) -o
$(LIBFULLNAME
)
854 @
$(ECHO
) "Shared Libraries not supported"
857 #####################################################################
859 #####################################################################
861 .PHONY
: fpc_showinstall fpc_install
863 ifdef EXTRAINSTALLUNITS
864 override INSTALLPPUFILES
+=$(addsuffix $(PPUEXT
),$(EXTRAINSTALLUNITS
))
867 ifdef INSTALLPPUFILES
868 override INSTALLPPUFILES
:=$(addprefix $(UNITTARGETDIRPREFIX
),$(INSTALLPPUFILES
))
870 INSTALLPPULINKFILES
:=$(shell $(PPUFILES
) -S
-O
$(INSTALLPPUFILES
))
872 INSTALLPPULINKFILES
:=$(wildcard $(subst $(PPUEXT
),$(OEXT
),$(INSTALLPPUFILES
)) $(addprefix $(LIBPREFIX
),$(subst $(PPUEXT
),$(STATICLIBEXT
),$(INSTALLPPUFILES
))))
874 override INSTALLPPULINKFILES
:=$(addprefix $(UNITTARGETDIRPREFIX
),$(INSTALLPPULINKFILES
))
877 ifdef INSTALLEXEFILES
878 override INSTALLEXEFILES
:=$(addprefix $(TARGETDIRPREFIX
),$(INSTALLEXEFILES
))
881 fpc_showinstall
: $(SHOWINSTALLTARGET
)
882 ifdef INSTALLEXEFILES
883 @
$(ECHO
) -e
$(addprefix "\n"$(BININSTALLDIR
)/,$(INSTALLEXEFILES
))
885 ifdef INSTALLPPUFILES
886 @
$(ECHO
) -e
$(addprefix "\n"$(UNITINSTALLDIR
)/,$(INSTALLPPUFILES
))
887 ifneq ($(INSTALLPPULINKFILES
),)
888 @
$(ECHO
) -e
$(addprefix "\n"$(UNITINSTALLDIR
)/,$(INSTALLPPULINKFILES
))
890 ifneq ($(wildcard $(LIBFULLNAME
)),)
891 @
$(ECHO
) $(LIBINSTALLDIR
)/$(LIBFULLNAME
)
893 @
$(ECHO
) $(LIBINSTALLDIR
)/$(LIBNAME
)
897 ifdef EXTRAINSTALLFILES
898 @
$(ECHO
) -e
$(addprefix "\n"$(DATAINSTALLDIR
)/,$(EXTRAINSTALLFILES
))
901 fpc_install
: $(INSTALLTARGET
)
902 # Create UnitInstallFiles
903 ifdef INSTALLEXEFILES
904 $(MKDIR
) $(BININSTALLDIR
)
905 # Compress the exes if upx is defined
907 -$(UPXPROG
) $(INSTALLEXEFILES
)
909 $(INSTALLEXE
) $(INSTALLEXEFILES
) $(BININSTALLDIR
)
911 ifdef INSTALLPPUFILES
912 $(MKDIR
) $(UNITINSTALLDIR
)
913 $(INSTALL
) $(INSTALLPPUFILES
) $(UNITINSTALLDIR
)
914 ifneq ($(INSTALLPPULINKFILES
),)
915 $(INSTALL
) $(INSTALLPPULINKFILES
) $(UNITINSTALLDIR
)
917 ifneq ($(wildcard $(LIBFULLNAME
)),)
918 $(MKDIR
) $(LIBINSTALLDIR
)
919 $(INSTALL
) $(LIBFULLNAME
) $(LIBINSTALLDIR
)
921 ln
-sf
$(LIBFULLNAME
) $(LIBINSTALLDIR
)/$(LIBNAME
)
925 ifdef EXTRAINSTALLFILES
926 $(MKDIR
) $(DATAINSTALLDIR
)
927 $(INSTALL
) $(EXTRAINSTALLFILES
) $(DATAINSTALLDIR
)
930 #####################################################################
931 # SourceInstall rules
932 #####################################################################
934 .PHONY
: fpc_sourceinstall
937 SOURCETOPDIR
=$(BASEDIR
)
940 fpc_sourceinstall
: clean
941 $(MKDIR
) $(SOURCEINSTALLDIR
)
942 $(COPYTREE
) $(SOURCETOPDIR
) $(SOURCEINSTALLDIR
)
944 #####################################################################
945 # exampleinstall rules
946 #####################################################################
948 .PHONY
: fpc_exampleinstall
950 fpc_exampleinstall
: $(addsuffix _clean
,$(EXAMPLEDIROBJECTS
))
951 ifdef EXAMPLESOURCEFILES
952 $(MKDIR
) $(EXAMPLEINSTALLDIR
)
953 $(COPY
) $(EXAMPLESOURCEFILES
) $(EXAMPLEINSTALLDIR
)
955 ifdef EXAMPLEDIROBJECTS
956 ifndef EXAMPLESOURCEFILES
957 $(MKDIR
) $(EXAMPLEINSTALLDIR
)
959 $(COPYTREE
) $(addsuffix /*,$(EXAMPLEDIROBJECTS
)) $(EXAMPLEINSTALLDIR
)
962 #####################################################################
964 #####################################################################
966 .PHONY
: fpc_zipinstall
968 # Create suffix to add
970 PACKAGESUFFIX
=$(OS_TARGET
)
971 ifeq ($(OS_TARGET
),go32v2
)
974 ifeq ($(OS_TARGET
),win32
)
977 ifeq ($(OS_TARGET
),os2
)
982 # Temporary path to pack a file
985 PACKDIR
=$(BASEDIR
)/pack_tmp
987 PACKDIR
=/tmp
/fpc-pack
991 # Maybe create default zipname from packagename
994 ZIPNAME
=$(PACKAGEPREFIX
)$(PACKAGENAME
)$(PACKAGESUFFIX
)
998 # Use tar by default under linux
1007 @
$(ECHO
) "Please specify ZIPNAME!"
1010 $(MAKE
) $(ZIPTARGET
) PREFIXINSTALLDIR
=$(PACKDIR
)
1012 $(DEL
) $(DESTZIPDIR
)/$(ZIPNAME
)$(TAREXT
)
1013 cd
$(PACKDIR
) ; $(TARPROG
) cf
$(TAROPT
) $(DESTZIPDIR
)/$(ZIPNAME
)$(TAREXT
) * ; cd
$(BASEDIR
)
1015 $(DEL
) $(DESTZIPDIR
)/$(ZIPNAME
)$(ZIPEXT
)
1016 cd
$(PACKDIR
) ; $(ZIPPROG
) -Dr
$(ZIPOPT
) $(DESTZIPDIR
)/$(ZIPNAME
)$(ZIPEXT
) * ; cd
$(BASEDIR
)
1018 $(DELTREE
) $(PACKDIR
)
1021 .PHONY
: fpc_zipsourceinstall
1023 fpc_zipsourceinstall
:
1024 $(MAKE
) fpc_zipinstall ZIPTARGET
=sourceinstall PACKAGESUFFIX
=src
1026 .PHONY
: fpc_zipexampleinstall
1028 fpc_zipexampleinstall
:
1029 $(MAKE
) fpc_zipinstall ZIPTARGET
=exampleinstall PACKAGESUFFIX
=exm
1031 #####################################################################
1033 #####################################################################
1035 .PHONY
: fpc_clean fpc_cleanall fpc_distclean
1038 override CLEANEXEFILES
:=$(addprefix $(TARGETDIRPREFIX
),$(CLEANEXEFILES
))
1041 ifdef EXTRACLEANUNITS
1042 override CLEANPPUFILES
+=$(addsuffix $(PPUEXT
),$(EXTRACLEANUNITS
))
1046 override CLEANPPUFILES
:=$(addprefix $(UNITTARGETDIRPREFIX
),$(CLEANPPUFILES
))
1047 # Get the .o and .a files created for the units
1049 CLEANPPULINKFILES
:=$(shell $(PPUFILES
) $(CLEANPPUFILES
))
1051 CLEANPPULINKFILES
:=$(wildcard $(subst $(PPUEXT
),$(OEXT
),$(CLEANPPUFILES
)) $(addprefix $(LIBPREFIX
),$(subst $(PPUEXT
),$(STATICLIBEXT
),$(CLEANPPUFILES
))))
1053 override CLEANPPULINKFILES
:=$(addprefix $(UNITTARGETDIRPREFIX
),$(CLEANPPULINKFILES
))
1056 fpc_clean
: $(CLEANTARGET
)
1058 -$(DEL
) $(CLEANEXEFILES
)
1061 -$(DEL
) $(CLEANPPUFILES
)
1063 ifneq ($(CLEANPPULINKFILES
),)
1064 -$(DEL
) $(CLEANPPULINKFILES
)
1067 -$(DEL
) $(addprefix $(UNITTARGETDIRPREFIX
),$(CLEANRSTFILES
))
1069 ifdef EXTRACLEANFILES
1070 -$(DEL
) $(EXTRACLEANFILES
)
1073 -$(DEL
) $(LIBNAME
) $(LIBFULLNAME
)
1075 -$(DEL
) $(FPCMADE
) $(PPAS
) link.res
$(FPCEXTFILE
) $(REDIRFILE
)
1077 fpc_distclean
: fpc_clean
1079 # Also run clean first if targetdir is set. Unittargetdir is always
1080 # set if targetdir or unittargetdir is specified
1082 TARGETDIRCLEAN
=fpc_clean
1085 fpc_cleanall
: $(CLEANTARGET
) $(TARGETDIRCLEAN
)
1087 -$(DEL
) $(CLEANEXEFILES
)
1089 -$(DEL
) *$(OEXT
) *$(PPUEXT
) *$(RSTEXT
) *$(ASMEXT
) *$(STATICLIBEXT
) *$(SHAREDLIBEXT
) *$(PPLEXT
)
1090 -$(DELTREE
) *$(SMARTEXT
)
1091 -$(DEL
) $(FPCMADE
) $(PPAS
) link.res
$(FPCEXTFILE
) $(REDIRFILE
)
1093 #####################################################################
1095 #####################################################################
1099 ifeq ($(OS_TARGET
),linux
)
1102 ifeq ($(OS_TARGET
),go32v2
)
1105 ifeq ($(OS_TARGET
),win32
)
1112 .PHONY
: text_all text_debug text_examples text_test text_smart text_shared text_showinstall text_install text_sourceinstall text_exampleinstall text_zipinstall text_zipsourceinstall text_zipexampleinstall text_clean text_distclean text_cleanall text_require text_info
1118 $(MAKE
) -C text debug
1121 $(MAKE
) -C text examples
1124 $(MAKE
) -C text
test
1127 $(MAKE
) -C text smart
1130 $(MAKE
) -C text shared
1133 $(MAKE
) -C text showinstall
1136 $(MAKE
) -C text
install
1139 $(MAKE
) -C text sourceinstall
1141 text_exampleinstall
:
1142 $(MAKE
) -C text exampleinstall
1145 $(MAKE
) -C text zipinstall
1147 text_zipsourceinstall
:
1148 $(MAKE
) -C text zipsourceinstall
1150 text_zipexampleinstall
:
1151 $(MAKE
) -C text zipexampleinstall
1154 $(MAKE
) -C text
clean
1157 $(MAKE
) -C text
distclean
1160 $(MAKE
) -C text cleanall
1163 $(MAKE
) -C text require
1166 $(MAKE
) -C text
info
1171 ifdef OBJECTDIRGRAPH
1172 .PHONY
: graph_all graph_debug graph_examples graph_test graph_smart graph_shared graph_showinstall graph_install graph_sourceinstall graph_exampleinstall graph_zipinstall graph_zipsourceinstall graph_zipexampleinstall graph_clean graph_distclean graph_cleanall graph_require graph_info
1175 $(MAKE
) -C graph
all
1178 $(MAKE
) -C graph debug
1181 $(MAKE
) -C graph examples
1184 $(MAKE
) -C graph
test
1187 $(MAKE
) -C graph smart
1190 $(MAKE
) -C graph shared
1193 $(MAKE
) -C graph showinstall
1196 $(MAKE
) -C graph
install
1198 graph_sourceinstall
:
1199 $(MAKE
) -C graph sourceinstall
1201 graph_exampleinstall
:
1202 $(MAKE
) -C graph exampleinstall
1205 $(MAKE
) -C graph zipinstall
1207 graph_zipsourceinstall
:
1208 $(MAKE
) -C graph zipsourceinstall
1210 graph_zipexampleinstall
:
1211 $(MAKE
) -C graph zipexampleinstall
1214 $(MAKE
) -C graph
clean
1217 $(MAKE
) -C graph
distclean
1220 $(MAKE
) -C graph cleanall
1223 $(MAKE
) -C graph require
1226 $(MAKE
) -C graph
info
1231 ifdef OBJECTDIRLINUX
1232 .PHONY
: linux_all linux_debug linux_examples linux_test linux_smart linux_shared linux_showinstall linux_install linux_sourceinstall linux_exampleinstall linux_zipinstall linux_zipsourceinstall linux_zipexampleinstall linux_clean linux_distclean linux_cleanall linux_require linux_info
1235 $(MAKE
) -C linux
all
1238 $(MAKE
) -C linux debug
1241 $(MAKE
) -C linux examples
1244 $(MAKE
) -C linux
test
1247 $(MAKE
) -C linux smart
1250 $(MAKE
) -C linux shared
1253 $(MAKE
) -C linux showinstall
1256 $(MAKE
) -C linux
install
1258 linux_sourceinstall
:
1259 $(MAKE
) -C linux sourceinstall
1261 linux_exampleinstall
:
1262 $(MAKE
) -C linux exampleinstall
1265 $(MAKE
) -C linux zipinstall
1267 linux_zipsourceinstall
:
1268 $(MAKE
) -C linux zipsourceinstall
1270 linux_zipexampleinstall
:
1271 $(MAKE
) -C linux zipexampleinstall
1274 $(MAKE
) -C linux
clean
1277 $(MAKE
) -C linux
distclean
1280 $(MAKE
) -C linux cleanall
1283 $(MAKE
) -C linux require
1286 $(MAKE
) -C linux
info
1291 ifdef OBJECTDIRMODEX
1292 .PHONY
: modex_all modex_debug modex_examples modex_test modex_smart modex_shared modex_showinstall modex_install modex_sourceinstall modex_exampleinstall modex_zipinstall modex_zipsourceinstall modex_zipexampleinstall modex_clean modex_distclean modex_cleanall modex_require modex_info
1295 $(MAKE
) -C modex
all
1298 $(MAKE
) -C modex debug
1301 $(MAKE
) -C modex examples
1304 $(MAKE
) -C modex
test
1307 $(MAKE
) -C modex smart
1310 $(MAKE
) -C modex shared
1313 $(MAKE
) -C modex showinstall
1316 $(MAKE
) -C modex
install
1318 modex_sourceinstall
:
1319 $(MAKE
) -C modex sourceinstall
1321 modex_exampleinstall
:
1322 $(MAKE
) -C modex exampleinstall
1325 $(MAKE
) -C modex zipinstall
1327 modex_zipsourceinstall
:
1328 $(MAKE
) -C modex zipsourceinstall
1330 modex_zipexampleinstall
:
1331 $(MAKE
) -C modex zipexampleinstall
1334 $(MAKE
) -C modex
clean
1337 $(MAKE
) -C modex
distclean
1340 $(MAKE
) -C modex cleanall
1343 $(MAKE
) -C modex require
1346 $(MAKE
) -C modex
info
1351 ifdef OBJECTDIRWIN32
1352 .PHONY
: win32_all win32_debug win32_examples win32_test win32_smart win32_shared win32_showinstall win32_install win32_sourceinstall win32_exampleinstall win32_zipinstall win32_zipsourceinstall win32_zipexampleinstall win32_clean win32_distclean win32_cleanall win32_require win32_info
1355 $(MAKE
) -C win32
all
1358 $(MAKE
) -C win32 debug
1361 $(MAKE
) -C win32 examples
1364 $(MAKE
) -C win32
test
1367 $(MAKE
) -C win32 smart
1370 $(MAKE
) -C win32 shared
1373 $(MAKE
) -C win32 showinstall
1376 $(MAKE
) -C win32
install
1378 win32_sourceinstall
:
1379 $(MAKE
) -C win32 sourceinstall
1381 win32_exampleinstall
:
1382 $(MAKE
) -C win32 exampleinstall
1385 $(MAKE
) -C win32 zipinstall
1387 win32_zipsourceinstall
:
1388 $(MAKE
) -C win32 zipsourceinstall
1390 win32_zipexampleinstall
:
1391 $(MAKE
) -C win32 zipexampleinstall
1394 $(MAKE
) -C win32
clean
1397 $(MAKE
) -C win32
distclean
1400 $(MAKE
) -C win32 cleanall
1403 $(MAKE
) -C win32 require
1406 $(MAKE
) -C win32
info
1409 #####################################################################
1411 #####################################################################
1413 ifneq ($(wildcard fpcmake.loc
),)
1417 #####################################################################
1419 #####################################################################
1424 @echo Makefile targets are
1431 @echo
- installexamples
1433 #################################
1434 # Demo installation for linux
1437 .PHONY
: installexamples
1440 $(MAKE
) sourceinstall SOURCEINSTALLDIR
=$(EXAMPLEINSTALLDIR
)