compiler/cli/bc.mak
changeset 16 17a2d1d9f205
child 17 ee807ff2f897
equal deleted inserted replaced
15:10a95d798b36 16:17a2d1d9f205
       
     1 # $Header$
       
     2 #
       
     3 # DO NOT EDIT 
       
     4 # automagically generated from the projectDefinition: jv_tea_compiler_cli.
       
     5 #
       
     6 # Warning: once you modify this file, do not rerun
       
     7 # stmkmp or projectDefinition-build again - otherwise, your changes are lost.
       
     8 #
       
     9 # Historic Note:
       
    10 #  this used to contain only rules to make with borland 
       
    11 #    (called via bmake, by "make.exe -f bc.mak")
       
    12 #  this has changed; it is now also possible to build using microsoft visual c
       
    13 #    (called via vcmake, by "make.exe -f bc.mak -DUSEVC")
       
    14 #
       
    15 
       
    16 TOP=..\..\..\..\stx       
       
    17 INCLUDE_TOP=$(TOP)\..
       
    18 
       
    19 # An old file, used as a dummy target for FORCE if we do not want
       
    20 #   re-make libraries. Windows make does not work if we redefine FORCE=   (empty string)
       
    21 # OLD_FILE=bmake.bat
       
    22 OLD_FILE="c:\windows\win.ini"
       
    23 
       
    24 #dummy target to force a build
       
    25 !ifndef FORCE
       
    26 FORCE=$(OLD_FILE)
       
    27 !endif
       
    28 
       
    29 CFLAGS_LOCAL=$(CFLAGS_APPTYPE) \
       
    30  -DSTARTUP_CLASS="\"TCompilerCommand\"" \
       
    31  -DSTARTUP_SELECTOR="\"start\"" \
       
    32  -DUSE_MODULE_TABLE
       
    33 
       
    34 #
       
    35 
       
    36 !INCLUDE $(TOP)\rules\stdHeader_bc
       
    37 !INCLUDE Make.spec
       
    38 
       
    39 OBJS= $(COMMON_OBJS) $(WIN32_OBJS)
       
    40 
       
    41 
       
    42 
       
    43 #
       
    44 APPNAME=libjv_tea_compiler_cli
       
    45 LIBNAME=dummy
       
    46 MODULE_PATH=tea\compiler\cli
       
    47 STCOPT="+optinline"
       
    48 LOCALINCLUDES= -I$(INCLUDE_TOP)\jv\tea\compiler -I$(INCLUDE_TOP)\stx\libbasic
       
    49 LOCALDEFINES=
       
    50 GLOBALDEFINES=
       
    51 
       
    52 STCLOCALOPT='-package=$(PACKAGE)' $(LOCALDEFINES) $(LOCALINCLUDES)  $(STCLOCALOPTIMIZATIONS) $(STCWARNINGS) $(LOCALDEFINES) $(COMMONSYMFLAG) -varPrefix=$(LIBNAME)
       
    53 
       
    54 LFLAGS=$(APP_LFLAGS)
       
    55 
       
    56 PROJECT_NOCONSOLE= teak.exe
       
    57 PROJECT_CONSOLE= teak.com
       
    58 ALLOBJFILES= main.$(O)
       
    59 !ifdef USETCC
       
    60 RESFILES=
       
    61 !else
       
    62 RESFILES= cliWinRC.$(RES)
       
    63 !endif
       
    64 
       
    65 ALLOBJ= $(ALLOBJFILES) $(OBJS)
       
    66 DEFFILE=$(TOP)\rules\bc_exe.def
       
    67 
       
    68 LIBFILES=$(LIBDIR_LIBRUN)\librun.lib
       
    69 ALLLIB=$(LIBFILES) $(APP_IMPORTLIBS) $(APP_RT_LIB)
       
    70 
       
    71 REQUIRED_LIBS=librun.dll  \
       
    72  libstx_libbasic.dll \
       
    73 
       
    74 
       
    75 REQUIRED_FILES=$(RT_DLL) $(X11_DLL) $(XEXT_DLL) symbols.stc $(REQUIRED_LIBS)
       
    76 
       
    77 REQUIRED_SUPPORT_DIRS=RESOURCEFILES
       
    78 
       
    79 target: ALL postBuildCleanup 
       
    80 
       
    81 # the executable, all required files and a self-installing-installer-exe
       
    82 ALL:: prereq ALL_NP
       
    83 
       
    84 # all, but no prereqs
       
    85 ALL_NP:: exe $(REQUIRED_SUPPORT_DIRS) postBuildCleanup setup
       
    86 
       
    87 exe:  newBuildDate $(REQUIRED_LIBS) noConsoleApp consoleApp registerApplication
       
    88 
       
    89 # the executable only
       
    90 # with console
       
    91 consoleApp: $(REQUIRED_LIBS)
       
    92 	-del main.$(O)
       
    93 	$(MAKE) -N -f bc.mak $(USE_ARG) \
       
    94 		MAKE_BAT=$(MAKE_BAT) \
       
    95 		PROJECT=$(PROJECT_CONSOLE) \
       
    96 		CFLAGS_APPTYPE=" -DWIN32GUI $(CFLAGS_CONSOLE)" \
       
    97 		LFLAGS_APPTYPE=" $(LFLAGS_CONSOLE)" \
       
    98 		CRT_STARTUP=" $(CRT_STARTUP_CONSOLE)" theExe
       
    99 
       
   100 # without console
       
   101 noConsoleApp: $(REQUIRED_LIBS)
       
   102 	-del main.$(O)
       
   103 	$(MAKE) -N -f bc.mak $(USE_ARG) \
       
   104 		MAKE_BAT=$(MAKE_BAT) \
       
   105 		PROJECT=$(PROJECT_NOCONSOLE) \
       
   106 		CFLAGS_APPTYPE=" -DWIN32GUI $(CFLAGS_NOCONSOLE) -DWIN_LOGFILE="\\"\"teak.log\\"\""" \
       
   107 		LFLAGS_APPTYPE=" $(LFLAGS_NOCONSOLE)" \
       
   108 		CRT_STARTUP=" $(CRT_STARTUP_NOCONSOLE)" theExe
       
   109 
       
   110 # the executable only (internal target; needs some defines)
       
   111 theExe: $(OUTDIR) $(OBJS) $(REQUIRED_FILES) show $(PROJECT) 
       
   112 
       
   113 # build all mandatory prerequisite packages (containing superclasses) for this package
       
   114 prereq:
       
   115 	$(MAKE) -N -f bc.mak $(USE_ARG) FORCE=FORCE_BUILD $(REQUIRED_LIBS)
       
   116 
       
   117 FORCE_BUILD:
       
   118 	@rem Dummy target to force a build
       
   119 
       
   120 # a nullsoft installable delivery
       
   121 # This uses the Nullsoft Installer Package and works in Windows only
       
   122 setup: $(PROJECT) postBuildCleanup cli.nsi
       
   123 	$(MAKENSIS) cli.nsi
       
   124         
       
   125 
       
   126 newBuildDate:
       
   127 	del buildDate.h
       
   128 
       
   129 new:
       
   130 	$(MAKE_BAT) clean
       
   131 	$(MAKE_BAT)
       
   132 
       
   133 RESOURCEFILES: teak_RESOURCES teak_BITMAPS  \
       
   134 	stx_RESOURCES stx_STYLES stx_BITMAPS
       
   135 
       
   136 
       
   137 teak_RESOURCES: resources\jv\tea\compiler\cli\NUL
       
   138 	-copy ..\resources\*.rs resources\jv\tea\compiler\cli\..
       
   139 	-copy ..\resources\*.style resources\jv\tea\compiler\cli\..
       
   140 
       
   141 teak_BITMAPS: resources\jv\tea\compiler\cli\bitmaps\NUL
       
   142 	-copy *.ico resources\jv\tea\compiler\cli\bitmaps
       
   143 	-copy *.gif resources\jv\tea\compiler\cli\bitmaps
       
   144 
       
   145 resources\jv\tea\compiler\cli\bitmaps\NUL: resources\jv\tea\compiler\cli\NUL
       
   146 	mkdir resources\jv\tea\compiler\cli\bitmaps
       
   147 
       
   148 resources\jv\tea\compiler\cli\NUL: resources\jv\tea\compiler\NUL
       
   149 	mkdir resources\jv\tea\compiler\cli
       
   150 
       
   151 resources\jv\tea\compiler\NUL: resources\jv\tea\NUL
       
   152 	mkdir resources\jv\tea\compiler
       
   153 
       
   154 resources\jv\tea\NUL: resources\jv\NUL
       
   155 	mkdir resources\jv\tea
       
   156 resources\jv\NUL: resources\NUL
       
   157 	mkdir resources\jv
       
   158 
       
   159 
       
   160 
       
   161 stx_RESOURCES: \
       
   162 	keyboard.rc \
       
   163 	keyboardMacros.rc \
       
   164 	host.rc \
       
   165 	h_win32.rc \
       
   166 	display.rc \
       
   167 	d_win32.rc \
       
   168 	libbasic_RESOURCES \
       
   169 	libview_RESOURCES \
       
   170 	libtool_RESOURCES  \
       
   171 	libtool2_RESOURCES
       
   172 
       
   173 keyboard.rc: $(TOP)\projects\smalltalk\keyboard.rc
       
   174 	copy $(TOP)\projects\smalltalk\keyboard.rc *.*
       
   175 
       
   176 keyboardMacros.rc: $(TOP)\projects\smalltalk\keyboardMacros.rc
       
   177 	copy $(TOP)\projects\smalltalk\keyboardMacros.rc *.*
       
   178 
       
   179 host.rc: $(TOP)\projects\smalltalk\host.rc
       
   180 	copy $(TOP)\projects\smalltalk\host.rc *.*
       
   181 
       
   182 h_win32.rc: $(TOP)\projects\smalltalk\h_win32.rc
       
   183 	copy $(TOP)\projects\smalltalk\h_win32.rc *.*
       
   184 
       
   185 display.rc: $(TOP)\projects\smalltalk\display.rc
       
   186 	copy $(TOP)\projects\smalltalk\display.rc *.*
       
   187 
       
   188 d_win32.rc: $(TOP)\projects\smalltalk\d_win32.rc
       
   189 	copy $(TOP)\projects\smalltalk\d_win32.rc *.*
       
   190 
       
   191 stx_STYLES: resources\stx\libview\NUL resources\stx\libview\styles\NUL
       
   192 	-copy $(TOP)\libview\styles\*.style resources\stx\libview\styles\*.*
       
   193 	-copy $(TOP)\libview\styles\*.common resources\stx\libview\styles\*.*
       
   194 
       
   195 stx_BITMAPS: \
       
   196 	libwidg_BITMAPS
       
   197 
       
   198 libwidg_BITMAPS: resources\stx\libwidg\bitmaps\NUL
       
   199 	-copy $(TOP)\libwidg\bitmaps\*.xpm resources\stx\libwidg\bitmaps\*.*
       
   200 
       
   201 libbasic_RESOURCES: resources\stx\libbasic\NUL
       
   202 	copy $(TOP)\libbasic\resources\*.rs resources\stx\libbasic\*.*
       
   203 
       
   204 libtool_RESOURCES: resources\stx\libtool\NUL
       
   205 	-copy $(TOP)\libtool\resources\*.rs resources\stx\libtool\*.*
       
   206 
       
   207 libtool2_RESOURCES: resources\stx\libtool2\NUL
       
   208 	-copy $(TOP)\libtool2\resources\*.rs resources\stx\libtool2\*.*
       
   209 
       
   210 libview_RESOURCES: resources\stx\libview\NUL 
       
   211 	-copy $(TOP)\libview\resources\*.rs resources\stx\libview\*.*
       
   212 
       
   213 libview2_RESOURCES: resources\stx\libview2\NUL
       
   214 	-copy $(TOP)\libview2\resources\*.rs resources\stx\libview2\*.*
       
   215 
       
   216 resources\stx\libbasic\NUL: resources\stx\NUL
       
   217 	mkdir resources\stx\libbasic
       
   218 
       
   219 resources\stx\libtool\NUL: resources\stx\NUL
       
   220 	mkdir resources\stx\libtool
       
   221 
       
   222 resources\stx\libtool2\NUL: resources\stx\NUL
       
   223 	mkdir resources\stx\libtool2
       
   224 
       
   225 resources\stx\libview\NUL: resources\stx\NUL
       
   226 	mkdir resources\stx\libview
       
   227 
       
   228 resources\stx\libview\styles\NUL: resources\stx\libview\NUL
       
   229 	mkdir resources\stx\libview\styles
       
   230 
       
   231 resources\stx\libview2\NUL: resources\stx\NUL
       
   232 	mkdir resources\stx\libview2
       
   233 
       
   234 resources\stx\libwidg\bitmaps\NUL: resources\stx\libwidg\NUL
       
   235 	mkdir resources\stx\libwidg\bitmaps
       
   236 
       
   237 resources\stx\libwidg\NUL: resources\stx\NUL
       
   238 	mkdir resources\stx\libwidg
       
   239 
       
   240 resources\stx\NUL: resources\NUL
       
   241 	mkdir resources\stx
       
   242 
       
   243 resources\NUL:
       
   244 	mkdir resources
       
   245 
       
   246 bitmaps\NUL:
       
   247 	mkdir bitmaps
       
   248 
       
   249 doc\NUL:
       
   250 	mkdir doc
       
   251 
       
   252 
       
   253 
       
   254 
       
   255 
       
   256 
       
   257 libstx_libbasic.dll: ..\..\..\..\stx\libbasic\$(OBJDIR)\libstx_libbasic.dll
       
   258 	copy ..\..\..\..\stx\libbasic\$(OBJDIR)\libstx_libbasic.dll *.*
       
   259 
       
   260 ..\..\..\..\stx\libbasic\$(OBJDIR)\libstx_libbasic.dll: $(FORCE)
       
   261 	pushd ..\..\..\..\stx\libbasic & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
       
   262 
       
   263       
       
   264 
       
   265 
       
   266 sources\NUL: 
       
   267 	mkdir sources
       
   268 
       
   269 show:
       
   270 	@echo LFLAGS= $(LFLAGS)
       
   271 	@echo ALLOBJ= $(ALLOBJ)
       
   272 	@echo PROJECT= $(PROJECT)
       
   273 	@echo APP_IMPORTLIBS= $(APP_IMPORTLIBS)
       
   274 	@echo ALLLIB= $(ALLLIB)
       
   275 	@echo DEFFILE= $(DEFFILE)
       
   276 	@echo ALLRES= $(ALLRES)
       
   277 
       
   278 !ifdef USEBC
       
   279 
       
   280 $(PROJECT_CONSOLE): $(ALLOBJFILES) $(OBJS) $(RESFILES) $(DEFFILE) $(LIBFILES)
       
   281 	$(APP_LINKER) $(LFLAGS) $(LFLAGS_APPTYPE) $(CRT_STARTUP) $(ALLOBJ), $(PROJECT_CONSOLE),, $(ALLLIB), $(DEFFILE), $(RESFILES)
       
   282 
       
   283 $(PROJECT_NOCONSOLE): $(ALLOBJFILES) $(OBJS) $(RESFILES) $(DEFFILE) $(LIBFILES)
       
   284 	$(APP_LINKER) $(LFLAGS) $(LFLAGS_APPTYPE) $(CRT_STARTUP) $(ALLOBJ), $(PROJECT_NOCONSOLE),, $(ALLLIB), $(DEFFILE), $(RESFILES)
       
   285 
       
   286 !else
       
   287 ! ifdef USEVC
       
   288 
       
   289 $(PROJECT_CONSOLE): $(ALLOBJFILES) $(OBJS) $(RESFILES) $(DEFFILE) $(LIBFILES)
       
   290 	$(APP_LINKER) $(LFLAGS) $(LFLAGS_APPTYPE) $(CRT_STARTUP) $(ALLOBJ) /OUT:"$(PROJECT_CONSOLE)" \
       
   291 	    /MANIFEST /MANIFESTFILE:"$(PROJECT_CONSOLE).manifest" \
       
   292 	    /PDB:"$(PROJECT_CONSOLE).pdb" \
       
   293 	    /SUBSYSTEM:CONSOLE $(ALLLIB) $(RESFILES)
       
   294 
       
   295 $(PROJECT_NOCONSOLE): $(ALLOBJFILES) $(OBJS) $(RESFILES) $(DEFFILE) $(LIBFILES)
       
   296 	$(APP_LINKER) $(LFLAGS) $(LFLAGS_APPTYPE) $(CRT_STARTUP) $(ALLOBJ) /OUT:"$(PROJECT_NOCONSOLE)" \
       
   297 	    /MANIFEST /MANIFESTFILE:"$(PROJECT_NOCONSOLE).manifest" \
       
   298 	    /PDB:"$(PROJECT_NOCONSOLE).pdb" \
       
   299 	    /SUBSYSTEM:WINDOWS $(ALLLIB) $(RESFILES)
       
   300 
       
   301 ! else
       
   302 !  ifdef USELCC
       
   303 
       
   304 $(PROJECT_CONSOLE): $(ALLOBJFILES) $(OBJS) $(RESFILES) $(DEFFILE) $(LIBFILES)
       
   305 	$(APP_LINKER) -subsystem console $(LFLAGS) $(LFLAGS_APPTYPE) $(CRT_STARTUP) $(ALLOBJ) -o "$(PROJECT_CONSOLE)" $(ALLLIB) $(RESFILES)
       
   306 
       
   307 $(PROJECT_NOCONSOLE): $(ALLOBJFILES) $(OBJS) $(RESFILES) $(DEFFILE) $(LIBFILES)
       
   308 	$(APP_LINKER) -subsystem windows $(LFLAGS) $(LFLAGS_APPTYPE) $(CRT_STARTUP) $(ALLOBJ) -o "$(PROJECT_NOCONSOLE)" $(ALLLIB) $(RESFILES)
       
   309 
       
   310 !  else
       
   311 !   ifdef USETCC
       
   312 
       
   313 $(PROJECT_CONSOLE): $(ALLOBJFILES) $(OBJS) $(RESFILES) $(DEFFILE) $(LIBFILES)
       
   314 	$(APP_LINKER) $(LFLAGS) $(LFLAGS_APPTYPE) $(CRT_STARTUP) $(ALLOBJ) -o "$(PROJECT_CONSOLE)" $(ALLLIB) $(RESFILES)
       
   315 
       
   316 $(PROJECT_NOCONSOLE): $(ALLOBJFILES) $(OBJS) $(RESFILES) $(DEFFILE) $(LIBFILES)
       
   317 	$(APP_LINKER) $(LFLAGS) $(LFLAGS_APPTYPE) $(CRT_STARTUP) $(ALLOBJ) -o "$(PROJECT_NOCONSOLE)" $(ALLLIB) $(RESFILES)
       
   318 
       
   319 !   else
       
   320 !    if defined(USEMINGW32) || defined(USEMINGW64)
       
   321 
       
   322 $(PROJECT_CONSOLE): $(ALLOBJFILES) $(OBJS) $(RESFILES) $(DEFFILE) $(LIBFILES) show
       
   323 	$(APP_LINKER) $(LFLAGS) $(LFLAGS_APPTYPE) $(CRT_STARTUP) $(ALLOBJ) -o "$(PROJECT_CONSOLE)" $(ALLLIB) $(RESFILES)
       
   324 
       
   325 $(PROJECT_NOCONSOLE): $(ALLOBJFILES) $(OBJS) $(RESFILES) $(DEFFILE) $(LIBFILES) show
       
   326 	$(APP_LINKER) $(LFLAGS) $(LFLAGS_APPTYPE) $(CRT_STARTUP) $(ALLOBJ) -o "$(PROJECT_NOCONSOLE)" $(ALLLIB) $(APP_IMPORTLIBS) $(RESFILES)
       
   327 
       
   328 !    else
       
   329 error error error
       
   330 !    endif
       
   331 !   endif
       
   332 !  endif
       
   333 ! endif
       
   334 !endif
       
   335 
       
   336 !INCLUDE $(TOP)\rules\stdRules_bc
       
   337 
       
   338 #
       
   339 # additional rules
       
   340 #
       
   341 teakWin.$(RES): teakWin.rc teak.ico
       
   342 
       
   343 main.$(O): buildDate.h main.c bc.mak
       
   344 
       
   345 main.c: $(TOP)\librun\main.c
       
   346 	copy $(TOP)\librun\main.c main.c
       
   347 
       
   348 # now in stdRules.
       
   349 #buildDate.h: $(GENDATE_UTILITIY)
       
   350 #        $(GENDATE_UTILITIY)
       
   351 
       
   352 librun.dll: $(TOP)\librun\$(OBJDIR_LIBRUN)\librun.dll
       
   353 	copy $(TOP)\librun\$(OBJDIR_LIBRUN)\librun.dll librun.dll
       
   354 
       
   355 #cs3245.dll
       
   356 $(RT_DLL): $(TOP)\support\win32\borland\$(RT_DLL)
       
   357 	copy $(TOP)\support\win32\borland\$(RT_DLL) $(RT_DLL)
       
   358 
       
   359 X11.dll: $(TOP)\support\win32\X11.dll
       
   360 	copy $(TOP)\support\win32\X11.dll X11.dll
       
   361 
       
   362 Xext.dll: $(TOP)\support\win32\Xext.dll
       
   363 	copy $(TOP)\support\win32\Xext.dll Xext.dll
       
   364 
       
   365 symbols.stc: $(TOP)\include\symbols.stc
       
   366 	copy $(TOP)\include\symbols.stc symbols.stc
       
   367 
       
   368 
       
   369 
       
   370 
       
   371 
       
   372 clean::
       
   373 	-del genDate.exe genDate.com
       
   374 	-del c0x32.dll
       
   375 	-del c0x32.lib
       
   376 	-del buildDate.h
       
   377 	-del $(PROJECT)
       
   378 	-del install_teak.exe
       
   379 	-del stx.lib
       
   380 	-del stx.dll
       
   381 	-del $(RT_DLL)
       
   382 	-del $(REQUIRED_FILES)
       
   383 	-del main.c
       
   384 	-del *.log
       
   385 	-del *.$(RES)
       
   386 	-rmdir /S /Q resources
       
   387 	-rmdir /S /Q $(OBJDIR)
       
   388 
       
   389 clobber:: clean
       
   390 	-del *.dll *.exe *.com
       
   391 
       
   392 postBuildCleanup::
       
   393 	@rem  stupid win-make does not allow empty
       
   394 
       
   395 # BEGINMAKEDEPEND --- do not remove this line; make depend needs it
       
   396 $(OUTDIR)TCompilerCommand.$(O) TCompilerCommand.$(H): TCompilerCommand.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libbasic\StandaloneStartup.$(H) $(STCHDR)
       
   397 $(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)
       
   398 
       
   399 # ENDMAKEDEPEND --- do not remove this line
       
   400 
       
   401 # **Must be at end**
       
   402 
       
   403 # Enforce recompilation of package definition class if Mercurial working
       
   404 # copy state changes. Together with --guessVersion it ensures that package
       
   405 # definition class always contains correct binary revision string.
       
   406 !IFDEF HGROOT
       
   407 $(OUTDIR)jv_tea_compiler_cli.$(O): $(HGROOT)\.hg\dirstate
       
   408 !ENDIF