Browse Source

now this is only a master makefile for the subdirs

alex 25 years ago
parent
commit
0df17434ea
2 changed files with 261 additions and 199 deletions
  1. 249 151
      install/demo/Makefile
  2. 12 48
      install/demo/Makefile.fpc

+ 249 - 151
install/demo/Makefile

@@ -1,8 +1,8 @@
 #
 #
-# Makefile generated by fpcmake v0.99.13 [2000/02/09]
+# Makefile generated by fpcmake v0.99.13 [2000/02/23]
 #
 #
 
 
-defaultrule: both
+defaultrule: all
 
 
 #####################################################################
 #####################################################################
 # Autodetect OS (Linux or Dos or Windows NT)
 # Autodetect OS (Linux or Dos or Windows NT)
@@ -162,21 +162,6 @@ endif
 endif
 endif
 endif
 endif
 
 
-ifndef PACKAGESDIR
-PACKAGESDIR=$(FPCDIR)/packages
-endif
-ifndef TOOLKITSDIR
-TOOLKITSDIR=
-endif
-ifndef COMPONENTSDIR
-COMPONENTSDIR=
-endif
-
-# Create units dir
-ifneq ($(FPCDIR),.)
-UNITSDIR=$(FPCDIR)/units/$(OS_TARGET)
-endif
-
 #####################################################################
 #####################################################################
 # User Settings
 # User Settings
 #####################################################################
 #####################################################################
@@ -184,17 +169,7 @@ endif
 
 
 # Targets
 # Targets
 
 
-override UNITOBJECTS+=gameunit
-override EXEOBJECTS+=eratos qsort hello blackbox magic lines fpctris
-ifeq ($(OS_TARGET),linux)
-override EXEOBJECTS+=mandel samegame quad maze gravwars
-endif
-ifeq ($(OS_TARGET),go32v2)
-override EXEOBJECTS+=mandel samegame quad maze gravwars voxel
-endif
-ifeq ($(OS_TARGET),win32)
-override EXEOBJECTS+=mandel samegame quad maze gravwars winhello menu dlltest testdll
-endif
+override DIROBJECTS+=$(wildcard text graph modex win32)
 
 
 # Clean
 # Clean
 
 
@@ -215,7 +190,7 @@ endif
 
 
 # Packages
 # Packages
 
 
-override PACKAGES+=rtl api
+override PACKAGES+=api
 
 
 # Libraries
 # Libraries
 
 
@@ -224,14 +199,6 @@ override PACKAGES+=rtl api
 
 
 INFOTARGET=fpc_infocfg fpc_infoobjects fpc_infoinstall 
 INFOTARGET=fpc_infocfg fpc_infoobjects fpc_infoinstall 
 
 
-#####################################################################
-# Post Settings
-#####################################################################
-
-ifdef GRAPHICS
-override FPCOPT+=-dUSEGRAPHICS
-endif
-
 #####################################################################
 #####################################################################
 # Shell tools
 # Shell tools
 #####################################################################
 #####################################################################
@@ -500,55 +467,11 @@ endif
 endif
 endif
 
 
 
 
-# Check if the dirs really exists, else turn it off
-ifeq ($(wildcard $(UNITSDIR)),)
-UNITSDIR=
-endif
-ifeq ($(wildcard $(TOOLKITSDIR)),)
-TOOLKITSDIR=
-endif
-ifeq ($(wildcard $(PACKAGESDIR)),)
-PACKAGESDIR=
-endif
-ifeq ($(wildcard $(COMPONENTSDIR)),)
-COMPONENTSDIR=
-endif
-
 
 
 # PACKAGESDIR packages
 # PACKAGESDIR packages
 
 
-PACKAGERTL=1
 PACKAGEAPI=1
 PACKAGEAPI=1
 
 
-ifdef PACKAGERTL
-ifneq ($(wildcard $(FPCDIR)/rtl),)
-ifneq ($(wildcard $(FPCDIR)/rtl/$(OS_TARGET)),)
-PACKAGEDIR_RTL=$(FPCDIR)/rtl/$(OS_TARGET)
-else
-PACKAGEDIR_RTL=$(FPCDIR)/rtl
-endif
-ifeq ($(wildcard $(PACKAGEDIR_RTL)/$(FPCMADE)),)
-override COMPILEPACKAGES+=package_rtl
-package_rtl:
-	$(MAKE) -C $(PACKAGEDIR_RTL) all
-endif
-UNITDIR_RTL=$(PACKAGEDIR_RTL)
-else
-PACKAGEDIR_RTL=
-ifneq ($(wildcard $(UNITSDIR)/rtl),)
-ifneq ($(wildcard $(UNITSDIR)/rtl/$(OS_TARGET)),)
-UNITDIR_RTL=$(UNITSDIR)/rtl/$(OS_TARGET)
-else
-UNITDIR_RTL=$(UNITSDIR)/rtl
-endif
-else
-UNITDIR_RTL=
-endif
-endif
-ifdef UNITDIR_RTL
-override NEEDUNITDIR+=$(UNITDIR_RTL)
-endif
-endif
 ifdef PACKAGEAPI
 ifdef PACKAGEAPI
 ifneq ($(wildcard $(FPCDIR)/api),)
 ifneq ($(wildcard $(FPCDIR)/api),)
 ifneq ($(wildcard $(FPCDIR)/api/$(OS_TARGET)),)
 ifneq ($(wildcard $(FPCDIR)/api/$(OS_TARGET)),)
@@ -801,60 +724,37 @@ endif
 # Standard rules
 # Standard rules
 #####################################################################
 #####################################################################
 
 
-all: fpc_all
+all: fpc_all $(addsuffix _all,$(DIROBJECTS))
 
 
-debug: fpc_debug
+debug: fpc_debug $(addsuffix _debug,$(DIROBJECTS))
 
 
-smart: fpc_smart
+examples: $(addsuffix _examples,$(DIROBJECTS))
 
 
-shared: fpc_shared
+test: $(addsuffix _test,$(DIROBJECTS))
 
 
-showinstall: fpc_showinstall
+smart: fpc_smart $(addsuffix _smart,$(DIROBJECTS))
 
 
-install: fpc_install
+shared: fpc_shared $(addsuffix _shared,$(DIROBJECTS))
 
 
-sourceinstall: fpc_sourceinstall
+showinstall: fpc_showinstall $(addsuffix _showinstall,$(DIROBJECTS))
 
 
-zipinstall: fpc_zipinstall
+install: fpc_install $(addsuffix _install,$(DIROBJECTS))
 
 
-zipsourceinstall: fpc_zipsourceinstall
-
-distclean: fpc_distclean
-
-cleanall: fpc_cleanall
-
-info: fpc_info
-
-.PHONY:  all debug smart shared showinstall install sourceinstall zipinstall zipsourceinstall distclean cleanall info
-
-#####################################################################
-# Units
-#####################################################################
-
-.PHONY: fpc_units
+sourceinstall: fpc_sourceinstall $(addsuffix _sourceinstall,$(DIROBJECTS))
 
 
-override ALLTARGET+=fpc_units
-
-override UNITPPUFILES=$(addsuffix $(PPUEXT),$(UNITOBJECTS))
-override INSTALLPPUFILES+=$(UNITPPUFILES)
-override CLEANPPUFILES+=$(UNITPPUFILES)
+zipinstall: fpc_zipinstall
 
 
-fpc_units: $(UNITPPUFILES)
+zipsourceinstall: fpc_zipsourceinstall
 
 
-#####################################################################
-# Exes
-#####################################################################
+clean: fpc_clean $(addsuffix _clean,$(DIROBJECTS))
 
 
-.PHONY: fpc_exes
+distclean: fpc_distclean $(addsuffix _distclean,$(DIROBJECTS))
 
 
-override EXEFILES=$(addsuffix $(EXEEXT),$(EXEOBJECTS))
-override EXEOFILES=$(addsuffix $(OEXT),$(EXEOBJECTS))
+cleanall: fpc_cleanall $(addsuffix _cleanall,$(DIROBJECTS))
 
 
-override ALLTARGET+=fpc_exes
-override INSTALLEXEFILES+=$(EXEFILES)
-override CLEANEXEFILES+=$(EXEFILES) $(EXEOFILES)
+require: $(addsuffix _require,$(DIROBJECTS))
 
 
-fpc_exes: $(EXEFILES)
+.PHONY:  all debug examples test smart shared showinstall install sourceinstall zipinstall zipsourceinstall clean distclean cleanall require
 
 
 #####################################################################
 #####################################################################
 # General compile rules
 # General compile rules
@@ -1167,50 +1067,248 @@ endif
 	@$(ECHO)
 	@$(ECHO)
 
 
 #####################################################################
 #####################################################################
-# Local Makefile
+# Directories
 #####################################################################
 #####################################################################
 
 
-ifneq ($(wildcard fpcmake.loc),)
-include fpcmake.loc
+OBJECTDIRTEXT=1
+OBJECTDIRGRAPH=1
+OBJECTDIRMODEX=1
+OBJECTDIRWIN32=1
+
+# 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_zipsourceinstall text_clean text_distclean text_cleanall text_require 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_zipsourceinstall:
+	$(MAKE) -C text zipsourceinstall
+
+text_clean:
+	$(MAKE) -C text clean
+
+text_distclean:
+	$(MAKE) -C text distclean
+
+text_cleanall:
+	$(MAKE) -C text cleanall
+
+text_require:
+	$(MAKE) -C text require
+
+text_info:
+	$(MAKE) -C text info
 endif
 endif
 
 
-#####################################################################
-# Users rules
-#####################################################################
+# Dir graph
 
 
-ifeq ($(OS_TARGET),win32)
-vpath %$(PASEXT) win32
+ifdef OBJECTDIRGRAPH
+.PHONY:  graph_all graph_debug graph_examples graph_test graph_smart graph_shared graph_showinstall graph_install graph_sourceinstall graph_zipinstall graph_zipsourceinstall graph_clean graph_distclean graph_cleanall graph_require graph_info
+
+graph_all:
+	$(MAKE) -C graph all
+
+graph_debug:
+	$(MAKE) -C graph debug
+
+graph_examples:
+	$(MAKE) -C graph examples
+
+graph_test:
+	$(MAKE) -C graph test
+
+graph_smart:
+	$(MAKE) -C graph smart
+
+graph_shared:
+	$(MAKE) -C graph shared
+
+graph_showinstall:
+	$(MAKE) -C graph showinstall
+
+graph_install:
+	$(MAKE) -C graph install
+
+graph_sourceinstall:
+	$(MAKE) -C graph sourceinstall
+
+graph_zipinstall:
+	$(MAKE) -C graph zipinstall
+
+graph_zipsourceinstall:
+	$(MAKE) -C graph zipsourceinstall
+
+graph_clean:
+	$(MAKE) -C graph clean
+
+graph_distclean:
+	$(MAKE) -C graph distclean
+
+graph_cleanall:
+	$(MAKE) -C graph cleanall
+
+graph_require:
+	$(MAKE) -C graph require
+
+graph_info:
+	$(MAKE) -C graph info
 endif
 endif
-.PHONY: text gfx both
 
 
-clean : execlean fpc_cleanall
+# Dir modex
 
 
-execlean :
-	  -$(DEL) tfpctris$(EXEEXT) tsamegam$(EXEEXT) *.scr
+ifdef OBJECTDIRMODEX
+.PHONY:  modex_all modex_debug modex_examples modex_test modex_smart modex_shared modex_showinstall modex_install modex_sourceinstall modex_zipinstall modex_zipsourceinstall modex_clean modex_distclean modex_cleanall modex_require modex_info
 
 
-text:
-	$(MAKE) all
-	$(MOVE) fpctris$(EXEEXT) tfpctris$(EXEEXT)
-	$(MOVE) samegame$(EXEEXT) tsamegam$(EXEEXT)
+modex_all:
+	$(MAKE) -C modex all
 
 
-gfx:
-	$(MAKE) all GRAPHICS=1
+modex_debug:
+	$(MAKE) -C modex debug
 
 
-both:
-	$(MAKE) text
-	$(DEL) gameunit$(OEXT) gameunit$(PPUEXT)
-	$(MAKE) gfx
+modex_examples:
+	$(MAKE) -C modex examples
 
 
-#################################
-# Demo installation for linux
-#
+modex_test:
+	$(MAKE) -C modex test
+
+modex_smart:
+	$(MAKE) -C modex smart
+
+modex_shared:
+	$(MAKE) -C modex shared
+
+modex_showinstall:
+	$(MAKE) -C modex showinstall
+
+modex_install:
+	$(MAKE) -C modex install
+
+modex_sourceinstall:
+	$(MAKE) -C modex sourceinstall
+
+modex_zipinstall:
+	$(MAKE) -C modex zipinstall
+
+modex_zipsourceinstall:
+	$(MAKE) -C modex zipsourceinstall
+
+modex_clean:
+	$(MAKE) -C modex clean
+
+modex_distclean:
+	$(MAKE) -C modex distclean
 
 
-.PHONY: installexamples
+modex_cleanall:
+	$(MAKE) -C modex cleanall
 
 
-ifndef EXAMPLESINSTALLDIR
-EXAMPLESINSTALLDIR=$(DOCINSTALLDIR)/examples
+modex_require:
+	$(MAKE) -C modex require
+
+modex_info:
+	$(MAKE) -C modex info
 endif
 endif
 
 
-installexamples:
-	$(MKDIR) $(EXAMPLESINSTALLDIR)
-	$(COPYTREE) * $(EXAMPLESINSTALLDIR)
+# Dir win32
+
+ifdef OBJECTDIRWIN32
+.PHONY:  win32_all win32_debug win32_examples win32_test win32_smart win32_shared win32_showinstall win32_install win32_sourceinstall win32_zipinstall win32_zipsourceinstall win32_clean win32_distclean win32_cleanall win32_require win32_info
+
+win32_all:
+	$(MAKE) -C win32 all
+
+win32_debug:
+	$(MAKE) -C win32 debug
+
+win32_examples:
+	$(MAKE) -C win32 examples
+
+win32_test:
+	$(MAKE) -C win32 test
+
+win32_smart:
+	$(MAKE) -C win32 smart
+
+win32_shared:
+	$(MAKE) -C win32 shared
+
+win32_showinstall:
+	$(MAKE) -C win32 showinstall
+
+win32_install:
+	$(MAKE) -C win32 install
+
+win32_sourceinstall:
+	$(MAKE) -C win32 sourceinstall
+
+win32_zipinstall:
+	$(MAKE) -C win32 zipinstall
+
+win32_zipsourceinstall:
+	$(MAKE) -C win32 zipsourceinstall
+
+win32_clean:
+	$(MAKE) -C win32 clean
+
+win32_distclean:
+	$(MAKE) -C win32 distclean
+
+win32_cleanall:
+	$(MAKE) -C win32 cleanall
+
+win32_require:
+	$(MAKE) -C win32 require
+
+win32_info:
+	$(MAKE) -C win32 info
+endif
+
+#####################################################################
+# Local Makefile
+#####################################################################
+
+ifneq ($(wildcard fpcmake.loc),)
+include fpcmake.loc
+endif
+
+#####################################################################
+# Users rules
+#####################################################################
+
+.PHONY: text graph modex win32
+
+info:
+	@echo makfeile targets are
+	@echo - all
+	@echo - text
+	@echo - graph
+	@echo - modex
+	@echo - win32

+ 12 - 48
install/demo/Makefile.fpc

@@ -1,15 +1,9 @@
 #
 #
-#   Makefile.fpc for FPC demoes and FPCGames package
+#   Makefile.fpc for FPC demo package
 #
 #
 
 
 [targets]
 [targets]
-units=gameunit
-programs=eratos qsort hello blackbox magic lines fpctris
-programs_win32=mandel samegame quad maze gravwars \
-               winhello menu dlltest testdll
-programs_linux=mandel samegame quad maze gravwars
-programs_go32v2=mandel samegame quad maze gravwars \
-                voxel
+dirs=text graph modex win32
 
 
 [require]
 [require]
 # Not always necessary, but saves a lot of trouble
 # Not always necessary, but saves a lot of trouble
@@ -19,52 +13,22 @@ packages=api
 packagename=demo
 packagename=demo
 
 
 [defaults]
 [defaults]
-defaultrule=both
+defaultrule=all
 
 
 [dirs]
 [dirs]
 fpcdir=..
 fpcdir=..
 targetdir=.
 targetdir=.
 
 
 [postsettings]
 [postsettings]
-ifdef GRAPHICS
-override FPCOPT+=-dUSEGRAPHICS
-endif
 
 
 [rules]
 [rules]
-ifeq ($(OS_TARGET),win32)
-vpath %$(PASEXT) win32
-endif
-.PHONY: text gfx both
-
-clean : execlean fpc_cleanall
-
-execlean :
-          -$(DEL) tfpctris$(EXEEXT) tsamegam$(EXEEXT) *.scr
-
-text:
-        $(MAKE) all
-        $(MOVE) fpctris$(EXEEXT) tfpctris$(EXEEXT)
-        $(MOVE) samegame$(EXEEXT) tsamegam$(EXEEXT)
-
-gfx:
-        $(MAKE) all GRAPHICS=1
-
-both:
-        $(MAKE) text
-        $(DEL) gameunit$(OEXT) gameunit$(PPUEXT)
-        $(MAKE) gfx
-
-#################################
-# Demo installation for linux
-#
-
-.PHONY: installexamples
-
-ifndef EXAMPLESINSTALLDIR
-EXAMPLESINSTALLDIR=$(DOCINSTALLDIR)/examples
-endif
-
-installexamples:
-        $(MKDIR) $(EXAMPLESINSTALLDIR)
-        $(COPYTREE) * $(EXAMPLESINSTALLDIR)
+.PHONY: text graph modex win32
+
+info:
+        @echo makfeile targets are
+        @echo - all
+        @echo - text
+        @echo - graph
+        @echo - modex
+        @echo - win32