compiler/cli/Make.proto
changeset 16 17a2d1d9f205
child 17 ee807ff2f897
equal deleted inserted replaced
15:10a95d798b36 16:17a2d1d9f205
       
     1 # $Header$
       
     2 #
       
     3 # automagically generated from the projectDefinition: jv_tea_compiler_cli.
       
     4 #
       
     5 # -------------- no need to change anything below ----------
       
     6 #
       
     7 # This makefile generates some standalone demo applications
       
     8 #
       
     9 #    make
       
    10 #       generates teak
       
    11 #
       
    12 
       
    13 TOP=../../../../stx
       
    14 INCLUDE_TOP=$(TOP)/..
       
    15 
       
    16 # set to a dummy file name (like FORCE=@@@FORCE-BUILD@@@) to force the build of prereq packages
       
    17 FORCE=
       
    18 .PHONY: $(FORCE)
       
    19 
       
    20 PACKAGE=jv:tea/compiler/cli
       
    21 SUBDIRS=
       
    22 SUPPRESS_LOCAL_ABBREVS="yes"
       
    23 NOAUTOLOAD=1
       
    24 NOSUBAUTOLOAD=1
       
    25 
       
    26 LOCALINCLUDES= -I$(INCLUDE_TOP)/jv/tea/compiler -I$(INCLUDE_TOP)/stx/libbasic
       
    27 LOCALDEFINES=
       
    28 GLOBALDEFINES=
       
    29 MAIN_DEFINES=-DIGNORE_IMAGE -DNO_DISPLAY
       
    30 
       
    31 RCSSOURCES=Make.proto *.st
       
    32 LINKSOURCES=Make.proto *.st
       
    33 
       
    34 DELIVERBINARIES=
       
    35 
       
    36 APPNAME=libjv_tea_compiler_cli
       
    37 LIBNAME=libjv_tea_compiler_cli
       
    38 STCLOCALOPT='-package=$(PACKAGE)' -I. -headerDir=. $(LOCALINCLUDES) $(STCLOCALOPTIMIZATIONS) $(STCWARNINGS) $(LOCALDEFINES) -headerDir=.  -varPrefix=$(LIBNAME)
       
    39 
       
    40 
       
    41 # ********** OPTIONAL: MODIFY the next line ***
       
    42 # additional C-libraries that should be pre-linked with the class-objects
       
    43 LD_OBJ_LIBS=
       
    44 LOCAL_SHARED_LIBS=
       
    45 
       
    46 
       
    47 # ********** OPTIONAL: MODIFY the next line ***
       
    48 # additional C targets or libraries should be added below
       
    49 LOCAL_EXTRA_TARGETS=
       
    50 
       
    51 OBJS= $(COMMON_OBJS) $(UNIX_OBJS)
       
    52 
       
    53 
       
    54 
       
    55 
       
    56 
       
    57 LIBLIST = $(REQUIRED_LIBS)
       
    58 
       
    59 # required libs:
       
    60 #
       
    61 
       
    62 REQUIRED_LIBS= libstx_libbasic \
       
    63 
       
    64 
       
    65 REQUIRED_LIBOBJS= $(TOP)/libbasic/libstx_libbasic$(O_EXT) \
       
    66 
       
    67 
       
    68 REQUIRED_LINK_LIBOBJS= libstx_libbasic$(O_EXT) \
       
    69 
       
    70 
       
    71 REQUIRED_SUPPORT_DIRS=RESOURCEFILES
       
    72 
       
    73 SUBPROJECT_LIBS=
       
    74 
       
    75 
       
    76 target: ALL
       
    77 
       
    78 all::   prereq ALL_NP
       
    79 
       
    80 # like ALL, but not prereqs
       
    81 ALL_NP:: exe $(SUBPROJECT_LIBS) $(REQUIRED_SUPPORT_DIRS) $(SETUP_RULE)
       
    82 
       
    83 exe:    teak registerApplication
       
    84 
       
    85 teak: $(APP_DIRS_TO_MAKE) $(APP_LIBOBJS) $(REQUIRED_LIBOBJS) $(OBJS)
       
    86 	$(MAKE) link_teak
       
    87 
       
    88 
       
    89 link_teak:
       
    90 	$(MAKE) NON_GUI_APPLICATION \
       
    91 		    TARGET=teak \
       
    92 		    APPLICATION_CLASSES="$(COMMON_CLASSES) $(UNIX_CLASSES)" \
       
    93 		    APPLICATION_OBJS="$(OBJS)" \
       
    94 		    APPLICATION_LIBLIST="$(REQUIRED_LIBS)" \
       
    95 		    APPLICATION_LIBOBJS="$(REQUIRED_LIBOBJS)" \
       
    96 		    APPLICATION_LINK_LIBOBJS="$(REQUIRED_LINK_LIBOBJS)" \
       
    97 		    STARTUP_CLASS="TCompilerCommand" \
       
    98 		    STARTUP_SELECTOR="start" \
       
    99 		    MAIN_DEFINES="-DIGNORE_IMAGE -DNO_DISPLAY"
       
   100 
       
   101 # build all mandatory prerequisite packages (containing superclasses) for this package
       
   102 prereq:
       
   103 	$(MAKE) FORCE=@@@FORCE-BUILD@@@ $(REQUIRED_LIBOBJS)
       
   104 
       
   105 #
       
   106 # a self installable delivery
       
   107 #
       
   108 # backward compatible fallback
       
   109 setup::
       
   110 	@if test -d autopackage; then \
       
   111 	    makepackage; \
       
   112 	else \
       
   113 	    echo "Error: make setup not yet available in this unix"; \
       
   114 	    exit 1; \
       
   115 	fi
       
   116 
       
   117 #
       
   118 # for linux, this uses autopackage
       
   119 #
       
   120 setup_linux:
       
   121 	@if test -d autopackage; then \
       
   122 	    makepackage; \
       
   123 	else \
       
   124 	    echo "Error: missing autopackage directory"; \
       
   125 	    exit 1; \
       
   126 	fi
       
   127 
       
   128 #
       
   129 # for mac, a dmg is generated
       
   130 #
       
   131 setup_macosx:   "TeaCompiler_dmg"
       
   132 	-rm "TeaCompiler.dmg"
       
   133 	hdiutil create -fs HFSX -layout SPUD "TeaCompiler.dmg" -srcfolder "TeaCompiler_dmg" -format UDZO -volname "TeaCompiler" -quiet
       
   134 
       
   135 app: "TeaCompiler_dmg"
       
   136 
       
   137 "TeaCompiler_dmg": $(SUBPROJECT_LIBS) $(REQUIRED_SUPPORT_DIRS) 
       
   138 	@-rm -rf "TeaCompiler_dmg"
       
   139 	@-mkdir "TeaCompiler_dmg"
       
   140 	@-mkdir "TeaCompiler_dmg/TeaCompiler.app"
       
   141 	@-mkdir "TeaCompiler_dmg/TeaCompiler.app/Contents"
       
   142 	@-mkdir "TeaCompiler_dmg/TeaCompiler.app/Contents/MacOS"
       
   143 	cp "teak" "TeaCompiler_dmg/TeaCompiler.app/Contents/MacOS/TeaCompiler"
       
   144 	@-mkdir "TeaCompiler_dmg/TeaCompiler.app/Contents/MacOS/."
       
   145 	-cp -r *.so "TeaCompiler_dmg/TeaCompiler.app/Contents/MacOS/."
       
   146 	-cp -r symbols.stc "TeaCompiler_dmg/TeaCompiler.app/Contents/MacOS/."
       
   147 	-cp -r *.stx "TeaCompiler_dmg/TeaCompiler.app/Contents/MacOS/."
       
   148 	-cp -r *.rc "TeaCompiler_dmg/TeaCompiler.app/Contents/MacOS/."
       
   149 	-cp -r resources "TeaCompiler_dmg/TeaCompiler.app/Contents/MacOS/."
       
   150 
       
   151 
       
   152 SOURCEFILES: teak_SOURCES \
       
   153 	stx_SOURCES
       
   154 
       
   155 
       
   156 
       
   157 
       
   158 RESOURCEFILES: teak_RESOURCES teak_BITMAPS  \
       
   159 	stx_RESOURCES stx_STYLES stx_BITMAPS
       
   160 
       
   161 
       
   162 teak_RESOURCES: 
       
   163 	mkdir -p resources/jv/tea/compiler/cli
       
   164 	-cp ../resources/*.rs ../resources/*.style resources/jv/tea/compiler/cli/..
       
   165 
       
   166 teak_BITMAPS: 
       
   167 	mkdir -p resources/jv/tea/compiler/cli/bitmaps
       
   168 	-cp *.ico *.gif *.png resources/jv/tea/compiler/cli/bitmaps
       
   169 
       
   170 
       
   171 stx_RESOURCES: \
       
   172 	libbasic_RESOURCES
       
   173 
       
   174 stx_STYLES: 
       
   175 
       
   176 stx_BITMAPS:
       
   177 
       
   178 libbasic_RESOURCES: 
       
   179 	mkdir -p resources/stx/libbasic
       
   180 	-cp $(TOP)/libbasic/resources/*.* resources/stx/libbasic
       
   181 
       
   182 
       
   183 libstx_libbasic.so: $(TOP)/libbasic/libstx_libbasic.so
       
   184 	ln -sf $(TOP)/libbasic/libstx_libbasic.so .
       
   185 
       
   186 $(TOP)/libbasic/libstx_libbasic.so: $(TOP)/libbasic/makefile $(FORCE)
       
   187 	@if [ -f "$(TOP)/libbasic/.NOSOURCE" ]; then \
       
   188 	    echo "skip make in $(TOP)/libbasic (no source)"; \
       
   189 	else \
       
   190 	    cd $(TOP)/libbasic && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES) "; \
       
   191 	fi
       
   192 
       
   193 $(TOP)/libbasic/makefile: $(TOP)/libbasic/Make.proto
       
   194 	$(TOP)/rules/stmkmf --cd $(TOP)/libbasic
       
   195 
       
   196 
       
   197 
       
   198 
       
   199 
       
   200 
       
   201 
       
   202 
       
   203 
       
   204 
       
   205 # Enforce recompilation of package definition class if Mercurial working
       
   206 # copy state changes. Together with --guessVersion it ensures that package
       
   207 # definition class always contains correct binary revision string.
       
   208 ifneq (**NOHG**, $(shell hg root 2> /dev/null || echo -n '**NOHG**'))
       
   209 jv_tea_compiler_cli.$(O): $(shell hg root)/.hg/dirstate
       
   210 endif
       
   211 
       
   212 
       
   213 
       
   214 
       
   215 clean::
       
   216 	-rm -f *.so teak.$(O)
       
   217 
       
   218 clobber:: clean
       
   219 	-rm -f teak *.img *.sav
       
   220 
       
   221 # BEGINMAKEDEPEND --- do not remove this line; make depend needs it
       
   222 $(OUTDIR)TCompilerCommand.$(O) TCompilerCommand.$(H): TCompilerCommand.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libbasic/StandaloneStartup.$(H) $(STCHDR)
       
   223 $(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)
       
   224 
       
   225 # ENDMAKEDEPEND --- do not remove this line