compiler/cli/Make.proto
changeset 16 17a2d1d9f205
child 17 ee807ff2f897
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/compiler/cli/Make.proto	Fri Sep 25 03:51:15 2015 +0100
@@ -0,0 +1,225 @@
+# $Header$
+#
+# automagically generated from the projectDefinition: jv_tea_compiler_cli.
+#
+# -------------- no need to change anything below ----------
+#
+# This makefile generates some standalone demo applications
+#
+#    make
+#       generates teak
+#
+
+TOP=../../../../stx
+INCLUDE_TOP=$(TOP)/..
+
+# set to a dummy file name (like FORCE=@@@FORCE-BUILD@@@) to force the build of prereq packages
+FORCE=
+.PHONY: $(FORCE)
+
+PACKAGE=jv:tea/compiler/cli
+SUBDIRS=
+SUPPRESS_LOCAL_ABBREVS="yes"
+NOAUTOLOAD=1
+NOSUBAUTOLOAD=1
+
+LOCALINCLUDES= -I$(INCLUDE_TOP)/jv/tea/compiler -I$(INCLUDE_TOP)/stx/libbasic
+LOCALDEFINES=
+GLOBALDEFINES=
+MAIN_DEFINES=-DIGNORE_IMAGE -DNO_DISPLAY
+
+RCSSOURCES=Make.proto *.st
+LINKSOURCES=Make.proto *.st
+
+DELIVERBINARIES=
+
+APPNAME=libjv_tea_compiler_cli
+LIBNAME=libjv_tea_compiler_cli
+STCLOCALOPT='-package=$(PACKAGE)' -I. -headerDir=. $(LOCALINCLUDES) $(STCLOCALOPTIMIZATIONS) $(STCWARNINGS) $(LOCALDEFINES) -headerDir=.  -varPrefix=$(LIBNAME)
+
+
+# ********** OPTIONAL: MODIFY the next line ***
+# additional C-libraries that should be pre-linked with the class-objects
+LD_OBJ_LIBS=
+LOCAL_SHARED_LIBS=
+
+
+# ********** OPTIONAL: MODIFY the next line ***
+# additional C targets or libraries should be added below
+LOCAL_EXTRA_TARGETS=
+
+OBJS= $(COMMON_OBJS) $(UNIX_OBJS)
+
+
+
+
+
+LIBLIST = $(REQUIRED_LIBS)
+
+# required libs:
+#
+
+REQUIRED_LIBS= libstx_libbasic \
+
+
+REQUIRED_LIBOBJS= $(TOP)/libbasic/libstx_libbasic$(O_EXT) \
+
+
+REQUIRED_LINK_LIBOBJS= libstx_libbasic$(O_EXT) \
+
+
+REQUIRED_SUPPORT_DIRS=RESOURCEFILES
+
+SUBPROJECT_LIBS=
+
+
+target: ALL
+
+all::   prereq ALL_NP
+
+# like ALL, but not prereqs
+ALL_NP:: exe $(SUBPROJECT_LIBS) $(REQUIRED_SUPPORT_DIRS) $(SETUP_RULE)
+
+exe:    teak registerApplication
+
+teak: $(APP_DIRS_TO_MAKE) $(APP_LIBOBJS) $(REQUIRED_LIBOBJS) $(OBJS)
+	$(MAKE) link_teak
+
+
+link_teak:
+	$(MAKE) NON_GUI_APPLICATION \
+		    TARGET=teak \
+		    APPLICATION_CLASSES="$(COMMON_CLASSES) $(UNIX_CLASSES)" \
+		    APPLICATION_OBJS="$(OBJS)" \
+		    APPLICATION_LIBLIST="$(REQUIRED_LIBS)" \
+		    APPLICATION_LIBOBJS="$(REQUIRED_LIBOBJS)" \
+		    APPLICATION_LINK_LIBOBJS="$(REQUIRED_LINK_LIBOBJS)" \
+		    STARTUP_CLASS="TCompilerCommand" \
+		    STARTUP_SELECTOR="start" \
+		    MAIN_DEFINES="-DIGNORE_IMAGE -DNO_DISPLAY"
+
+# build all mandatory prerequisite packages (containing superclasses) for this package
+prereq:
+	$(MAKE) FORCE=@@@FORCE-BUILD@@@ $(REQUIRED_LIBOBJS)
+
+#
+# a self installable delivery
+#
+# backward compatible fallback
+setup::
+	@if test -d autopackage; then \
+	    makepackage; \
+	else \
+	    echo "Error: make setup not yet available in this unix"; \
+	    exit 1; \
+	fi
+
+#
+# for linux, this uses autopackage
+#
+setup_linux:
+	@if test -d autopackage; then \
+	    makepackage; \
+	else \
+	    echo "Error: missing autopackage directory"; \
+	    exit 1; \
+	fi
+
+#
+# for mac, a dmg is generated
+#
+setup_macosx:   "TeaCompiler_dmg"
+	-rm "TeaCompiler.dmg"
+	hdiutil create -fs HFSX -layout SPUD "TeaCompiler.dmg" -srcfolder "TeaCompiler_dmg" -format UDZO -volname "TeaCompiler" -quiet
+
+app: "TeaCompiler_dmg"
+
+"TeaCompiler_dmg": $(SUBPROJECT_LIBS) $(REQUIRED_SUPPORT_DIRS) 
+	@-rm -rf "TeaCompiler_dmg"
+	@-mkdir "TeaCompiler_dmg"
+	@-mkdir "TeaCompiler_dmg/TeaCompiler.app"
+	@-mkdir "TeaCompiler_dmg/TeaCompiler.app/Contents"
+	@-mkdir "TeaCompiler_dmg/TeaCompiler.app/Contents/MacOS"
+	cp "teak" "TeaCompiler_dmg/TeaCompiler.app/Contents/MacOS/TeaCompiler"
+	@-mkdir "TeaCompiler_dmg/TeaCompiler.app/Contents/MacOS/."
+	-cp -r *.so "TeaCompiler_dmg/TeaCompiler.app/Contents/MacOS/."
+	-cp -r symbols.stc "TeaCompiler_dmg/TeaCompiler.app/Contents/MacOS/."
+	-cp -r *.stx "TeaCompiler_dmg/TeaCompiler.app/Contents/MacOS/."
+	-cp -r *.rc "TeaCompiler_dmg/TeaCompiler.app/Contents/MacOS/."
+	-cp -r resources "TeaCompiler_dmg/TeaCompiler.app/Contents/MacOS/."
+
+
+SOURCEFILES: teak_SOURCES \
+	stx_SOURCES
+
+
+
+
+RESOURCEFILES: teak_RESOURCES teak_BITMAPS  \
+	stx_RESOURCES stx_STYLES stx_BITMAPS
+
+
+teak_RESOURCES: 
+	mkdir -p resources/jv/tea/compiler/cli
+	-cp ../resources/*.rs ../resources/*.style resources/jv/tea/compiler/cli/..
+
+teak_BITMAPS: 
+	mkdir -p resources/jv/tea/compiler/cli/bitmaps
+	-cp *.ico *.gif *.png resources/jv/tea/compiler/cli/bitmaps
+
+
+stx_RESOURCES: \
+	libbasic_RESOURCES
+
+stx_STYLES: 
+
+stx_BITMAPS:
+
+libbasic_RESOURCES: 
+	mkdir -p resources/stx/libbasic
+	-cp $(TOP)/libbasic/resources/*.* resources/stx/libbasic
+
+
+libstx_libbasic.so: $(TOP)/libbasic/libstx_libbasic.so
+	ln -sf $(TOP)/libbasic/libstx_libbasic.so .
+
+$(TOP)/libbasic/libstx_libbasic.so: $(TOP)/libbasic/makefile $(FORCE)
+	@if [ -f "$(TOP)/libbasic/.NOSOURCE" ]; then \
+	    echo "skip make in $(TOP)/libbasic (no source)"; \
+	else \
+	    cd $(TOP)/libbasic && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES) "; \
+	fi
+
+$(TOP)/libbasic/makefile: $(TOP)/libbasic/Make.proto
+	$(TOP)/rules/stmkmf --cd $(TOP)/libbasic
+
+
+
+
+
+
+
+
+
+
+# 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.
+ifneq (**NOHG**, $(shell hg root 2> /dev/null || echo -n '**NOHG**'))
+jv_tea_compiler_cli.$(O): $(shell hg root)/.hg/dirstate
+endif
+
+
+
+
+clean::
+	-rm -f *.so teak.$(O)
+
+clobber:: clean
+	-rm -f teak *.img *.sav
+
+# 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