compiler/cli/bc.mak
changeset 16 17a2d1d9f205
child 17 ee807ff2f897
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/compiler/cli/bc.mak	Fri Sep 25 03:51:15 2015 +0100
@@ -0,0 +1,408 @@
+# $Header$
+#
+# DO NOT EDIT 
+# automagically generated from the projectDefinition: jv_tea_compiler_cli.
+#
+# Warning: once you modify this file, do not rerun
+# stmkmp or projectDefinition-build again - otherwise, your changes are lost.
+#
+# Historic Note:
+#  this used to contain only rules to make with borland 
+#    (called via bmake, by "make.exe -f bc.mak")
+#  this has changed; it is now also possible to build using microsoft visual c
+#    (called via vcmake, by "make.exe -f bc.mak -DUSEVC")
+#
+
+TOP=..\..\..\..\stx       
+INCLUDE_TOP=$(TOP)\..
+
+# An old file, used as a dummy target for FORCE if we do not want
+#   re-make libraries. Windows make does not work if we redefine FORCE=   (empty string)
+# OLD_FILE=bmake.bat
+OLD_FILE="c:\windows\win.ini"
+
+#dummy target to force a build
+!ifndef FORCE
+FORCE=$(OLD_FILE)
+!endif
+
+CFLAGS_LOCAL=$(CFLAGS_APPTYPE) \
+ -DSTARTUP_CLASS="\"TCompilerCommand\"" \
+ -DSTARTUP_SELECTOR="\"start\"" \
+ -DUSE_MODULE_TABLE
+
+#
+
+!INCLUDE $(TOP)\rules\stdHeader_bc
+!INCLUDE Make.spec
+
+OBJS= $(COMMON_OBJS) $(WIN32_OBJS)
+
+
+
+#
+APPNAME=libjv_tea_compiler_cli
+LIBNAME=dummy
+MODULE_PATH=tea\compiler\cli
+STCOPT="+optinline"
+LOCALINCLUDES= -I$(INCLUDE_TOP)\jv\tea\compiler -I$(INCLUDE_TOP)\stx\libbasic
+LOCALDEFINES=
+GLOBALDEFINES=
+
+STCLOCALOPT='-package=$(PACKAGE)' $(LOCALDEFINES) $(LOCALINCLUDES)  $(STCLOCALOPTIMIZATIONS) $(STCWARNINGS) $(LOCALDEFINES) $(COMMONSYMFLAG) -varPrefix=$(LIBNAME)
+
+LFLAGS=$(APP_LFLAGS)
+
+PROJECT_NOCONSOLE= teak.exe
+PROJECT_CONSOLE= teak.com
+ALLOBJFILES= main.$(O)
+!ifdef USETCC
+RESFILES=
+!else
+RESFILES= cliWinRC.$(RES)
+!endif
+
+ALLOBJ= $(ALLOBJFILES) $(OBJS)
+DEFFILE=$(TOP)\rules\bc_exe.def
+
+LIBFILES=$(LIBDIR_LIBRUN)\librun.lib
+ALLLIB=$(LIBFILES) $(APP_IMPORTLIBS) $(APP_RT_LIB)
+
+REQUIRED_LIBS=librun.dll  \
+ libstx_libbasic.dll \
+
+
+REQUIRED_FILES=$(RT_DLL) $(X11_DLL) $(XEXT_DLL) symbols.stc $(REQUIRED_LIBS)
+
+REQUIRED_SUPPORT_DIRS=RESOURCEFILES
+
+target: ALL postBuildCleanup 
+
+# the executable, all required files and a self-installing-installer-exe
+ALL:: prereq ALL_NP
+
+# all, but no prereqs
+ALL_NP:: exe $(REQUIRED_SUPPORT_DIRS) postBuildCleanup setup
+
+exe:  newBuildDate $(REQUIRED_LIBS) noConsoleApp consoleApp registerApplication
+
+# the executable only
+# with console
+consoleApp: $(REQUIRED_LIBS)
+	-del main.$(O)
+	$(MAKE) -N -f bc.mak $(USE_ARG) \
+		MAKE_BAT=$(MAKE_BAT) \
+		PROJECT=$(PROJECT_CONSOLE) \
+		CFLAGS_APPTYPE=" -DWIN32GUI $(CFLAGS_CONSOLE)" \
+		LFLAGS_APPTYPE=" $(LFLAGS_CONSOLE)" \
+		CRT_STARTUP=" $(CRT_STARTUP_CONSOLE)" theExe
+
+# without console
+noConsoleApp: $(REQUIRED_LIBS)
+	-del main.$(O)
+	$(MAKE) -N -f bc.mak $(USE_ARG) \
+		MAKE_BAT=$(MAKE_BAT) \
+		PROJECT=$(PROJECT_NOCONSOLE) \
+		CFLAGS_APPTYPE=" -DWIN32GUI $(CFLAGS_NOCONSOLE) -DWIN_LOGFILE="\\"\"teak.log\\"\""" \
+		LFLAGS_APPTYPE=" $(LFLAGS_NOCONSOLE)" \
+		CRT_STARTUP=" $(CRT_STARTUP_NOCONSOLE)" theExe
+
+# the executable only (internal target; needs some defines)
+theExe: $(OUTDIR) $(OBJS) $(REQUIRED_FILES) show $(PROJECT) 
+
+# build all mandatory prerequisite packages (containing superclasses) for this package
+prereq:
+	$(MAKE) -N -f bc.mak $(USE_ARG) FORCE=FORCE_BUILD $(REQUIRED_LIBS)
+
+FORCE_BUILD:
+	@rem Dummy target to force a build
+
+# a nullsoft installable delivery
+# This uses the Nullsoft Installer Package and works in Windows only
+setup: $(PROJECT) postBuildCleanup cli.nsi
+	$(MAKENSIS) cli.nsi
+        
+
+newBuildDate:
+	del buildDate.h
+
+new:
+	$(MAKE_BAT) clean
+	$(MAKE_BAT)
+
+RESOURCEFILES: teak_RESOURCES teak_BITMAPS  \
+	stx_RESOURCES stx_STYLES stx_BITMAPS
+
+
+teak_RESOURCES: resources\jv\tea\compiler\cli\NUL
+	-copy ..\resources\*.rs resources\jv\tea\compiler\cli\..
+	-copy ..\resources\*.style resources\jv\tea\compiler\cli\..
+
+teak_BITMAPS: resources\jv\tea\compiler\cli\bitmaps\NUL
+	-copy *.ico resources\jv\tea\compiler\cli\bitmaps
+	-copy *.gif resources\jv\tea\compiler\cli\bitmaps
+
+resources\jv\tea\compiler\cli\bitmaps\NUL: resources\jv\tea\compiler\cli\NUL
+	mkdir resources\jv\tea\compiler\cli\bitmaps
+
+resources\jv\tea\compiler\cli\NUL: resources\jv\tea\compiler\NUL
+	mkdir resources\jv\tea\compiler\cli
+
+resources\jv\tea\compiler\NUL: resources\jv\tea\NUL
+	mkdir resources\jv\tea\compiler
+
+resources\jv\tea\NUL: resources\jv\NUL
+	mkdir resources\jv\tea
+resources\jv\NUL: resources\NUL
+	mkdir resources\jv
+
+
+
+stx_RESOURCES: \
+	keyboard.rc \
+	keyboardMacros.rc \
+	host.rc \
+	h_win32.rc \
+	display.rc \
+	d_win32.rc \
+	libbasic_RESOURCES \
+	libview_RESOURCES \
+	libtool_RESOURCES  \
+	libtool2_RESOURCES
+
+keyboard.rc: $(TOP)\projects\smalltalk\keyboard.rc
+	copy $(TOP)\projects\smalltalk\keyboard.rc *.*
+
+keyboardMacros.rc: $(TOP)\projects\smalltalk\keyboardMacros.rc
+	copy $(TOP)\projects\smalltalk\keyboardMacros.rc *.*
+
+host.rc: $(TOP)\projects\smalltalk\host.rc
+	copy $(TOP)\projects\smalltalk\host.rc *.*
+
+h_win32.rc: $(TOP)\projects\smalltalk\h_win32.rc
+	copy $(TOP)\projects\smalltalk\h_win32.rc *.*
+
+display.rc: $(TOP)\projects\smalltalk\display.rc
+	copy $(TOP)\projects\smalltalk\display.rc *.*
+
+d_win32.rc: $(TOP)\projects\smalltalk\d_win32.rc
+	copy $(TOP)\projects\smalltalk\d_win32.rc *.*
+
+stx_STYLES: resources\stx\libview\NUL resources\stx\libview\styles\NUL
+	-copy $(TOP)\libview\styles\*.style resources\stx\libview\styles\*.*
+	-copy $(TOP)\libview\styles\*.common resources\stx\libview\styles\*.*
+
+stx_BITMAPS: \
+	libwidg_BITMAPS
+
+libwidg_BITMAPS: resources\stx\libwidg\bitmaps\NUL
+	-copy $(TOP)\libwidg\bitmaps\*.xpm resources\stx\libwidg\bitmaps\*.*
+
+libbasic_RESOURCES: resources\stx\libbasic\NUL
+	copy $(TOP)\libbasic\resources\*.rs resources\stx\libbasic\*.*
+
+libtool_RESOURCES: resources\stx\libtool\NUL
+	-copy $(TOP)\libtool\resources\*.rs resources\stx\libtool\*.*
+
+libtool2_RESOURCES: resources\stx\libtool2\NUL
+	-copy $(TOP)\libtool2\resources\*.rs resources\stx\libtool2\*.*
+
+libview_RESOURCES: resources\stx\libview\NUL 
+	-copy $(TOP)\libview\resources\*.rs resources\stx\libview\*.*
+
+libview2_RESOURCES: resources\stx\libview2\NUL
+	-copy $(TOP)\libview2\resources\*.rs resources\stx\libview2\*.*
+
+resources\stx\libbasic\NUL: resources\stx\NUL
+	mkdir resources\stx\libbasic
+
+resources\stx\libtool\NUL: resources\stx\NUL
+	mkdir resources\stx\libtool
+
+resources\stx\libtool2\NUL: resources\stx\NUL
+	mkdir resources\stx\libtool2
+
+resources\stx\libview\NUL: resources\stx\NUL
+	mkdir resources\stx\libview
+
+resources\stx\libview\styles\NUL: resources\stx\libview\NUL
+	mkdir resources\stx\libview\styles
+
+resources\stx\libview2\NUL: resources\stx\NUL
+	mkdir resources\stx\libview2
+
+resources\stx\libwidg\bitmaps\NUL: resources\stx\libwidg\NUL
+	mkdir resources\stx\libwidg\bitmaps
+
+resources\stx\libwidg\NUL: resources\stx\NUL
+	mkdir resources\stx\libwidg
+
+resources\stx\NUL: resources\NUL
+	mkdir resources\stx
+
+resources\NUL:
+	mkdir resources
+
+bitmaps\NUL:
+	mkdir bitmaps
+
+doc\NUL:
+	mkdir doc
+
+
+
+
+
+
+libstx_libbasic.dll: ..\..\..\..\stx\libbasic\$(OBJDIR)\libstx_libbasic.dll
+	copy ..\..\..\..\stx\libbasic\$(OBJDIR)\libstx_libbasic.dll *.*
+
+..\..\..\..\stx\libbasic\$(OBJDIR)\libstx_libbasic.dll: $(FORCE)
+	pushd ..\..\..\..\stx\libbasic & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
+
+      
+
+
+sources\NUL: 
+	mkdir sources
+
+show:
+	@echo LFLAGS= $(LFLAGS)
+	@echo ALLOBJ= $(ALLOBJ)
+	@echo PROJECT= $(PROJECT)
+	@echo APP_IMPORTLIBS= $(APP_IMPORTLIBS)
+	@echo ALLLIB= $(ALLLIB)
+	@echo DEFFILE= $(DEFFILE)
+	@echo ALLRES= $(ALLRES)
+
+!ifdef USEBC
+
+$(PROJECT_CONSOLE): $(ALLOBJFILES) $(OBJS) $(RESFILES) $(DEFFILE) $(LIBFILES)
+	$(APP_LINKER) $(LFLAGS) $(LFLAGS_APPTYPE) $(CRT_STARTUP) $(ALLOBJ), $(PROJECT_CONSOLE),, $(ALLLIB), $(DEFFILE), $(RESFILES)
+
+$(PROJECT_NOCONSOLE): $(ALLOBJFILES) $(OBJS) $(RESFILES) $(DEFFILE) $(LIBFILES)
+	$(APP_LINKER) $(LFLAGS) $(LFLAGS_APPTYPE) $(CRT_STARTUP) $(ALLOBJ), $(PROJECT_NOCONSOLE),, $(ALLLIB), $(DEFFILE), $(RESFILES)
+
+!else
+! ifdef USEVC
+
+$(PROJECT_CONSOLE): $(ALLOBJFILES) $(OBJS) $(RESFILES) $(DEFFILE) $(LIBFILES)
+	$(APP_LINKER) $(LFLAGS) $(LFLAGS_APPTYPE) $(CRT_STARTUP) $(ALLOBJ) /OUT:"$(PROJECT_CONSOLE)" \
+	    /MANIFEST /MANIFESTFILE:"$(PROJECT_CONSOLE).manifest" \
+	    /PDB:"$(PROJECT_CONSOLE).pdb" \
+	    /SUBSYSTEM:CONSOLE $(ALLLIB) $(RESFILES)
+
+$(PROJECT_NOCONSOLE): $(ALLOBJFILES) $(OBJS) $(RESFILES) $(DEFFILE) $(LIBFILES)
+	$(APP_LINKER) $(LFLAGS) $(LFLAGS_APPTYPE) $(CRT_STARTUP) $(ALLOBJ) /OUT:"$(PROJECT_NOCONSOLE)" \
+	    /MANIFEST /MANIFESTFILE:"$(PROJECT_NOCONSOLE).manifest" \
+	    /PDB:"$(PROJECT_NOCONSOLE).pdb" \
+	    /SUBSYSTEM:WINDOWS $(ALLLIB) $(RESFILES)
+
+! else
+!  ifdef USELCC
+
+$(PROJECT_CONSOLE): $(ALLOBJFILES) $(OBJS) $(RESFILES) $(DEFFILE) $(LIBFILES)
+	$(APP_LINKER) -subsystem console $(LFLAGS) $(LFLAGS_APPTYPE) $(CRT_STARTUP) $(ALLOBJ) -o "$(PROJECT_CONSOLE)" $(ALLLIB) $(RESFILES)
+
+$(PROJECT_NOCONSOLE): $(ALLOBJFILES) $(OBJS) $(RESFILES) $(DEFFILE) $(LIBFILES)
+	$(APP_LINKER) -subsystem windows $(LFLAGS) $(LFLAGS_APPTYPE) $(CRT_STARTUP) $(ALLOBJ) -o "$(PROJECT_NOCONSOLE)" $(ALLLIB) $(RESFILES)
+
+!  else
+!   ifdef USETCC
+
+$(PROJECT_CONSOLE): $(ALLOBJFILES) $(OBJS) $(RESFILES) $(DEFFILE) $(LIBFILES)
+	$(APP_LINKER) $(LFLAGS) $(LFLAGS_APPTYPE) $(CRT_STARTUP) $(ALLOBJ) -o "$(PROJECT_CONSOLE)" $(ALLLIB) $(RESFILES)
+
+$(PROJECT_NOCONSOLE): $(ALLOBJFILES) $(OBJS) $(RESFILES) $(DEFFILE) $(LIBFILES)
+	$(APP_LINKER) $(LFLAGS) $(LFLAGS_APPTYPE) $(CRT_STARTUP) $(ALLOBJ) -o "$(PROJECT_NOCONSOLE)" $(ALLLIB) $(RESFILES)
+
+!   else
+!    if defined(USEMINGW32) || defined(USEMINGW64)
+
+$(PROJECT_CONSOLE): $(ALLOBJFILES) $(OBJS) $(RESFILES) $(DEFFILE) $(LIBFILES) show
+	$(APP_LINKER) $(LFLAGS) $(LFLAGS_APPTYPE) $(CRT_STARTUP) $(ALLOBJ) -o "$(PROJECT_CONSOLE)" $(ALLLIB) $(RESFILES)
+
+$(PROJECT_NOCONSOLE): $(ALLOBJFILES) $(OBJS) $(RESFILES) $(DEFFILE) $(LIBFILES) show
+	$(APP_LINKER) $(LFLAGS) $(LFLAGS_APPTYPE) $(CRT_STARTUP) $(ALLOBJ) -o "$(PROJECT_NOCONSOLE)" $(ALLLIB) $(APP_IMPORTLIBS) $(RESFILES)
+
+!    else
+error error error
+!    endif
+!   endif
+!  endif
+! endif
+!endif
+
+!INCLUDE $(TOP)\rules\stdRules_bc
+
+#
+# additional rules
+#
+teakWin.$(RES): teakWin.rc teak.ico
+
+main.$(O): buildDate.h main.c bc.mak
+
+main.c: $(TOP)\librun\main.c
+	copy $(TOP)\librun\main.c main.c
+
+# now in stdRules.
+#buildDate.h: $(GENDATE_UTILITIY)
+#        $(GENDATE_UTILITIY)
+
+librun.dll: $(TOP)\librun\$(OBJDIR_LIBRUN)\librun.dll
+	copy $(TOP)\librun\$(OBJDIR_LIBRUN)\librun.dll librun.dll
+
+#cs3245.dll
+$(RT_DLL): $(TOP)\support\win32\borland\$(RT_DLL)
+	copy $(TOP)\support\win32\borland\$(RT_DLL) $(RT_DLL)
+
+X11.dll: $(TOP)\support\win32\X11.dll
+	copy $(TOP)\support\win32\X11.dll X11.dll
+
+Xext.dll: $(TOP)\support\win32\Xext.dll
+	copy $(TOP)\support\win32\Xext.dll Xext.dll
+
+symbols.stc: $(TOP)\include\symbols.stc
+	copy $(TOP)\include\symbols.stc symbols.stc
+
+
+
+
+
+clean::
+	-del genDate.exe genDate.com
+	-del c0x32.dll
+	-del c0x32.lib
+	-del buildDate.h
+	-del $(PROJECT)
+	-del install_teak.exe
+	-del stx.lib
+	-del stx.dll
+	-del $(RT_DLL)
+	-del $(REQUIRED_FILES)
+	-del main.c
+	-del *.log
+	-del *.$(RES)
+	-rmdir /S /Q resources
+	-rmdir /S /Q $(OBJDIR)
+
+clobber:: clean
+	-del *.dll *.exe *.com
+
+postBuildCleanup::
+	@rem  stupid win-make does not allow empty
+
+# BEGINMAKEDEPEND --- do not remove this line; make depend needs it
+$(OUTDIR)TCompilerCommand.$(O) TCompilerCommand.$(H): TCompilerCommand.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libbasic\StandaloneStartup.$(H) $(STCHDR)
+$(OUTDIR)jv_tea_compiler_cli.$(O) jv_tea_compiler_cli.$(H): jv_tea_compiler_cli.st $(INCLUDE_TOP)\stx\libbasic\ApplicationDefinition.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libbasic\ProjectDefinition.$(H) $(STCHDR)
+
+# ENDMAKEDEPEND --- do not remove this line
+
+# **Must be at end**
+
+# Enforce recompilation of package definition class if Mercurial working
+# copy state changes. Together with --guessVersion it ensures that package
+# definition class always contains correct binary revision string.
+!IFDEF HGROOT
+$(OUTDIR)jv_tea_compiler_cli.$(O): $(HGROOT)\.hg\dirstate
+!ENDIF