Browse Source

* zlib deps

peter 25 years ago
parent
commit
7348ca067a
2 changed files with 78 additions and 1 deletions
  1. 75 1
      fcl/tests/Makefile
  2. 3 0
      fcl/tests/Makefile.fpc

+ 75 - 1
fcl/tests/Makefile

@@ -201,6 +201,12 @@ endif
 # Packages
 
 override PACKAGES+=rtl fcl
+ifeq ($(OS_TARGET),linux)
+override PACKAGES+=zlib
+endif
+ifeq ($(OS_TARGET),win32)
+override PACKAGES+=paszlib
+endif
 ifneq ($(wildcard $(FPCDIR)/rtl),)
 ifneq ($(wildcard $(FPCDIR)/rtl/$(OS_TARGET)),)
 PACKAGEDIR_RTL=$(FPCDIR)/rtl/$(OS_TARGET)
@@ -245,6 +251,50 @@ endif
 ifdef UNITDIR_FCL
 override NEEDUNITDIR+=$(UNITDIR_FCL)
 endif
+ifneq ($(wildcard $(PACKAGEDIR)/zlib),)
+ifneq ($(wildcard $(PACKAGEDIR)/zlib/$(OS_TARGET)),)
+PACKAGEDIR_ZLIB=$(PACKAGEDIR)/zlib/$(OS_TARGET)
+else
+PACKAGEDIR_ZLIB=$(PACKAGEDIR)/zlib
+endif
+UNITDIR_ZLIB=$(PACKAGEDIR_ZLIB)
+else
+PACKAGEDIR_ZLIB=
+ifneq ($(wildcard $(UNITSDIR)/zlib),)
+ifneq ($(wildcard $(UNITSDIR)/zlib/$(OS_TARGET)),)
+UNITDIR_ZLIB=$(UNITSDIR)/zlib/$(OS_TARGET)
+else
+UNITDIR_ZLIB=$(UNITSDIR)/zlib
+endif
+else
+UNITDIR_ZLIB=
+endif
+endif
+ifdef UNITDIR_ZLIB
+override NEEDUNITDIR+=$(UNITDIR_ZLIB)
+endif
+ifneq ($(wildcard $(PACKAGEDIR)/paszlib),)
+ifneq ($(wildcard $(PACKAGEDIR)/paszlib/$(OS_TARGET)),)
+PACKAGEDIR_PASZLIB=$(PACKAGEDIR)/paszlib/$(OS_TARGET)
+else
+PACKAGEDIR_PASZLIB=$(PACKAGEDIR)/paszlib
+endif
+UNITDIR_PASZLIB=$(PACKAGEDIR_PASZLIB)
+else
+PACKAGEDIR_PASZLIB=
+ifneq ($(wildcard $(UNITSDIR)/paszlib),)
+ifneq ($(wildcard $(UNITSDIR)/paszlib/$(OS_TARGET)),)
+UNITDIR_PASZLIB=$(UNITSDIR)/paszlib/$(OS_TARGET)
+else
+UNITDIR_PASZLIB=$(UNITSDIR)/paszlib
+endif
+else
+UNITDIR_PASZLIB=
+endif
+endif
+ifdef UNITDIR_PASZLIB
+override NEEDUNITDIR+=$(UNITDIR_PASZLIB)
+endif
 
 # Libraries
 
@@ -759,6 +809,12 @@ endif
 
 PACKAGERTL=1
 PACKAGEFCL=1
+ifeq ($(OS_TARGET),linux)
+PACKAGEZLIB=1
+endif
+ifeq ($(OS_TARGET),win32)
+PACKAGEPASZLIB=1
+endif
 ifdef PACKAGERTL
 ifneq ($(wildcard $(PACKAGEDIR_RTL)),)
 ifeq ($(wildcard $(PACKAGEDIR_RTL)/$(FPCMADE)),)
@@ -777,8 +833,26 @@ fcl_package:
 endif
 endif
 endif
+ifdef PACKAGEZLIB
+ifneq ($(wildcard $(PACKAGEDIR_ZLIB)),)
+ifeq ($(wildcard $(PACKAGEDIR_ZLIB)/$(FPCMADE)),)
+override COMPILEPACKAGES+=zlib
+zlib_package:
+	$(MAKE) -C $(PACKAGEDIR_ZLIB) all
+endif
+endif
+endif
+ifdef PACKAGEPASZLIB
+ifneq ($(wildcard $(PACKAGEDIR_PASZLIB)),)
+ifeq ($(wildcard $(PACKAGEDIR_PASZLIB)/$(FPCMADE)),)
+override COMPILEPACKAGES+=paszlib
+paszlib_package:
+	$(MAKE) -C $(PACKAGEDIR_PASZLIB) all
+endif
+endif
+endif
 
-.PHONY:  rtl_package rtl_package fcl_package
+.PHONY:  rtl_package rtl_package fcl_package zlib_package paszlib_package
 
 #####################################################################
 # Exes

+ 3 - 0
fcl/tests/Makefile.fpc

@@ -11,6 +11,9 @@ rst=restest
 [require]
 options=-S2
 packages=fcl
+packages_linux=zlib
+packages_win32=paszlib
+packages_go32=paszlib
 
 [dirs]
 fpcdir=../..