# This file lists all of the sources that require a special build.
#
# File Format:
#   #
#       lines that begin with '#' are comment lines
#   whitespace
#       is ignored
#  	[path/file.ext] 
#       marks a file section (typically .bas files)
#   DEP = path/filename.ext
#       dependency
#   CMD = args
#       FBC build command
#   SRC = path/filename.ext
#       additional source needed to build
#   DST = path/filename.ext
#       files generated after the build is complete.
#       only DST files are removed when the ./samples clean
#       command is used.
#   SKP = 
#       Skip to end of section
#   op,WIN32
#       only on win32, cygwin, or xbox platforms
#   op,LINUX
#       only on unix ( linux, freebsd, etc ) platforms
#   op,DOS32
#       only on dos platform
#
# -------------------------------------------------------------------

[prepro/error.bas]
# this example does not compile and intentionally generates an error

[prepro/inclib.bas]
# this example does not compile since the needed lib does not exist

# -------------------------------------------------------------------

[procs/mydll.bas]
	SKP,DOS32 =
	CMD       = -dll procs/mydll.bas
	DST,WIN32 = procs/mydll$(DLLEXT)
	DST,WIN32 = procs/libmydll$(DLLEXT).a
	DST,LINUX = procs/libmydll$(DLLEXT)

[procs/lib.bas]
	SKP,DOS32 =
	DEP = procs/mydll.bas
	CMD = procs/lib.bas -p procs
	DST = procs/lib$(EXEEXT)

# -------------------------------------------------------------------

[module/common1.bas]
	DEP = module/common2.bas
	CMD = module/common1.bas module/common2.bas
	DST = module/common1$(EXEEXT)

[module/common2.bas]
# this example is used by module/common1.bas

# -------------------------------------------------------------------

[module/mydll.bas]
	SKP,DOS32 =
	CMD       = -dll module/mydll.bas
	DST,WIN32 = module/mydll$(DLLEXT)
	DST,WIN32 = module/libmydll$(DLLEXT).a
	DST,LINUX = module/libmydll$(DLLEXT)

[module/export.bas]
	SKP,DOS32 =
	DEP = module/mydll.bas
	CMD = module/mydll.bas -p module
	DST = module/mydll$(EXEEXT)

[module/mydll2.bas]
# module/mydll2.bas is same as module/mydll.bas
# it exists in two places in the documentation, so
# is twice in the 'module' directory

# -------------------------------------------------------------------

[module/dylibsymbol.bas]
	SKP,DOS32 =
	DEP = module/mydll.bas
	CMD = module/dylibsymbol.bas -p module
	DST = module/dylibsymbol$(EXEEXT)

# -------------------------------------------------------------------

[module/extern1.bas]
	DEP = module/extern2.bas
	CMD = module/extern1.bas module/extern2.bas
	DST = module/extern1$(EXEEXT)

[module/extern2.bas]
# used by module/extern1.bas

# -------------------------------------------------------------------

[module/mydll.c]
# requires gcc

[module/import.bas]
# requires mydll.c which requires gcc

# -------------------------------------------------------------------

[proguide/static-lib/mylib.bas]
	CMD = -lib proguide/static-lib/mylib.bas
	DST = proguide/static-lib/libmylib.a

[proguide/static-lib/mytest.bas]
	DEP = proguide/static-lib/mylib.bas
	CMD = proguide/static-lib/mytest.bas -p proguide/static-lib
	DST = proguide/static-lib/mytest$(EXEEXT)

# -------------------------------------------------------------------

[proguide/shared-lib/mylib.bas]
	SKP,DOS32 =
	CMD       = -dll proguide/shared-lib/mylib.bas
	DST,WIN32 = proguide/shared-lib/mylib$(DLLEXT)
	DST,WIN32 = proguide/shared-lib/libmylib$(DLLEXT).a
	DST,LINUX = proguide/shared-lib/libmylib$(DLLEXT)

[proguide/shared-lib/mytest.bas]
	SKP,DOS32 =
	DEP = proguide/shared-lib/mylib.bas
	CMD = proguide/shared-lib/mytest.bas -p proguide/shared-lib
	DST = proguide/shared-lib/mytest$(EXEEXT)

# -------------------------------------------------------------------

[proguide/varscope/module1.bas]
	DEP = proguide/varscope/module2.bas
	CMD = -lang qb proguide/varscope/module1.bas proguide/varscope/module2.bas
	DST = proguide/varscope/module1$(EXEEXT)

[proguide/varscope/module2.bas]
# used by proguide/varscope/module3.bas

# -------------------------------------------------------------------

[proguide/varscope/module3.bas]
	DEP = proguide/varscope/module4.bas
	CMD = proguide/varscope/module3.bas proguide/varscope/module4.bas
	DST = proguide/varscope/module3$(EXEEXT)

[proguide/varscope/module4.bas]
# used by proguide/varscope/module3.bas

# -------------------------------------------------------------------
# No special options are required for these samples,
# but they only work on certain platforms.
# (there should be a better way to do this)

[module/dylibfree.bas]
	SKP,DOS32 =
	CMD = module/dylibfree.bas
	DST = module/dylibfree$(EXEEXT)

[module/dylibload.bas]
	SKP,DOS32 =
	CMD = module/dylibload.bas
	DST = module/dylibload$(EXEEXT)

[faq/dos/lowmemas.bas]
	CMD,DOS32 = faq/dos/lowmemas.bas
	DST,DOS32 = faq/dos/lowmemas$(EXEEXT)

[extras/freeimage.bas]
	CMD,WIN32 = extras/freeimage.bas
	DST,WIN32 = extras/freeimage$(EXEEXT)

[extras/gfx-null.bas]
	CMD,WIN32 = extras/gfx-null.bas
	DST,WIN32 = extras/gfx-null$(EXEEXT)

[proguide/libs/libs3.bas]
	CMD,WIN32 = proguide/libs/libs3.bas
	DST,WIN32 = proguide/libs/libs3$(EXEEXT)

[proguide/libs/libs4.bas]
	CMD,WIN32 = proguide/libs/libs4.bas
	DST,WIN32 = proguide/libs/libs4$(EXEEXT)

[proguide/libs/libs5.bas]
	SKP,DOS32 =
	CMD = proguide/libs/libs5.bas
	DST = proguide/libs/libs5$(EXEEXT)

# -------------------------------------------------------------------
# EOF
