Make.proto
author Jan Vrany <jan.vrany@fit.cvut.cz>
Wed, 19 Sep 2012 01:38:26 +0000
changeset 20 8caf2f257260
parent 11 d354ac2af7ec
permissions -rw-r--r--
- fixes for package support
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
9e312de5f694 - Initial commit
jv
parents:
diff changeset
     1
# $Header$
9e312de5f694 - Initial commit
jv
parents:
diff changeset
     2
#
9e312de5f694 - Initial commit
jv
parents:
diff changeset
     3
# DO NOT EDIT
9e312de5f694 - Initial commit
jv
parents:
diff changeset
     4
# automagically generated from the projectDefinition: stx_goodies_metacello.
9e312de5f694 - Initial commit
jv
parents:
diff changeset
     5
#
9e312de5f694 - Initial commit
jv
parents:
diff changeset
     6
# Warning: once you modify this file, do not rerun
9e312de5f694 - Initial commit
jv
parents:
diff changeset
     7
# stmkmp or projectDefinition-build again - otherwise, your changes are lost.
9e312de5f694 - Initial commit
jv
parents:
diff changeset
     8
#
9e312de5f694 - Initial commit
jv
parents:
diff changeset
     9
# The Makefile as generated by this Make.proto supports the following targets:
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    10
#    make         - compile all st-files to a classLib
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    11
#    make clean   - clean all temp files
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    12
#    make clobber - clean all
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    13
#
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    14
# This file contains definitions for Unix based platforms.
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    15
# It shares common definitions with the win32-make in Make.spec.
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    16
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    17
#
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    18
# position (of this package) in directory hierarchy:
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    19
# (must point to ST/X top directory, for tools and includes)
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    20
TOP=../..
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    21
INCLUDE_TOP=$(TOP)/..
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    22
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    23
# subdirectories where targets are to be made:
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    24
SUBDIRS=
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    25
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    26
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    27
# subdirectories where Makefiles are to be made:
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    28
# (only define if different from SUBDIRS)
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    29
# ALLSUBDIRS=
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    30
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    31
REQUIRED_SUPPORT_DIRS=
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    32
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    33
# if your embedded C code requires any system includes,
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    34
# add the path(es) here:,
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    35
# ********** OPTIONAL: MODIFY the next lines ***
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    36
# LOCALINCLUDES=-Ifoo -Ibar
11
d354ac2af7ec Metacello package refactoring - phase 2~
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1
diff changeset
    37
LOCALINCLUDES= -I$(INCLUDE_TOP)/stx/goodies/metacello/stx -I$(INCLUDE_TOP)/stx/goodies/metacello/base -I$(INCLUDE_TOP)/stx/goodies/metacello/core -I$(INCLUDE_TOP)/stx/libbasic
1
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    38
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    39
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    40
# if you need any additional defines for embedded C code,
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    41
# add them here:,
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    42
# ********** OPTIONAL: MODIFY the next lines ***
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    43
# LOCALDEFINES=-Dfoo -Dbar -DDEBUG
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    44
LOCALDEFINES=
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    45
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    46
LIBNAME=libstx_goodies_metacello
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    47
STCLOCALOPT='-package=$(PACKAGE)' -I. $(LOCALINCLUDES) $(STCLOCALOPTIMIZATIONS) $(STCWARNINGS) $(LOCALDEFINES) -headerDir=.  -varPrefix=$(LIBNAME)
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    48
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    49
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    50
# ********** OPTIONAL: MODIFY the next line ***
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    51
# additional C-libraries that should be pre-linked with the class-objects
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    52
LD_OBJ_LIBS=
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    53
LOCAL_SHARED_LIBS=
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    54
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    55
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    56
# ********** OPTIONAL: MODIFY the next line ***
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    57
# additional C targets or libraries should be added below
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    58
LOCAL_EXTRA_TARGETS=
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    59
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    60
OBJS= $(COMMON_OBJS) $(UNIX_OBJS)
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    61
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    62
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    63
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    64
all:: preMake classLibRule postMake
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    65
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    66
pre_objs::  
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    67
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    68
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    69
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    70
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    71
# Update SVN revision in stx_libbasic3.st
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    72
ifneq (,$(findstring .svn,$(wildcard .svn)))
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    73
.svnversion: *.st
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    74
	if [ -d .svn ]; then \
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    75
		rev=$(shell svnversion -n); \
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    76
		echo -n $$rev > .svnversion; \
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    77
	else \
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    78
		echo -n exported > .svnversion; \
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    79
	fi
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    80
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    81
stx_goodies_metacello.o: stx_goodies_metacello.st .svnversion 
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    82
	@if [ -d .svn ]; then \
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    83
		rev2="$(shell printf "%-16s" $$(cat .svnversion))"; \
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    84
		echo "  [SV]  Expanding svnRevisionNo in $1.st"; \
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    85
		sed -e "s/\"\$$SVN\-Revision:\".*\"\$$\"/\"\$$SVN-Revision:\"\'$$rev2\'\"\$$\"/g" $< > .stx_goodies_metacello.svn.st; \
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    86
	fi
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    87
	$(MAKE) CC="$(CLASSLIB_CC)" OPT="$(OPT)" SEPINITCODE="$(SEPINITCODE)" STC="$(STC)" STFILE=.stx_goodies_metacello.svn $(C_RULE);
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    88
	sed -i -e "s/\".stx_goodies_metacello.svn.st\");/\"\stx_goodies_metacello.st\");/g" .stx_goodies_metacello.svn.c
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    89
	$(MAKE) .stx_goodies_metacello.svn.$(O)
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    90
	@mv .stx_goodies_metacello.svn.$(O) stx_goodies_metacello.$(O) 
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    91
endif
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    92
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    93
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    94
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    95
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    96
# add more install actions here
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    97
install::
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    98
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    99
# add more install actions for aux-files (resources) here
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   100
installAux::
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   101
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   102
# add more preMake actions here
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   103
preMake::
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   104
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   105
# add more postMake actions here
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   106
postMake:: cleanjunk
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   107
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   108
prereq: $(REQUIRED_SUPPORT_DIRS)
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   109
	cd ../../libbasic && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
11
d354ac2af7ec Metacello package refactoring - phase 2~
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1
diff changeset
   110
	cd base && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
d354ac2af7ec Metacello package refactoring - phase 2~
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1
diff changeset
   111
	cd core && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
d354ac2af7ec Metacello package refactoring - phase 2~
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1
diff changeset
   112
	cd stx && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
1
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   113
	cd ../../librun && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   114
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   115
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   116
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   117
cleanjunk::
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   118
	-rm -f *.s *.s2
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   119
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   120
clean::
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   121
	-rm -f *.o *.H
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   122
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   123
clobber:: clean
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   124
	-rm -f *.so *.dll
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   125
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   126
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   127
# BEGINMAKEDEPEND --- do not remove this line; make depend needs it
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   128
$(OUTDIR)stx_goodies_metacello.$(O) stx_goodies_metacello.$(H): stx_goodies_metacello.st $(INCLUDE_TOP)/stx/libbasic/LibraryDefinition.$(H) $(INCLUDE_TOP)/stx/libbasic/ProjectDefinition.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   129
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   130
# ENDMAKEDEPEND --- do not remove this line
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   131