Subversion Repositories shark

Rev

Rev 1279 | Blame | Compare with Previous | Last modification | View Log | RSS feed

#
# help can be found in readme.txt
#

# -----------------------------------------------------
#
# OS dependent variables:

# all the OS dependent variables and dependencies are under $(OS)/makefile.in

# This makefile will execute the dependency os_specific_dep to "fill"
# the out directory with OS-specific stuffs; Then, the makefile
# generated in the out directory will be executed with $(TEST) as
# parameter.

ifndef $(BASE)
BASE=../..
endif

include $(BASE)/config/config.mk

ifeq ($(OS),MARTE)
OSINCLUDE=marte/makefile.in
endif

ifeq ($(OS),SHARK)
OSINCLUDE=shark/makefile.in
endif

# -----------------------------------------------------

.PHONY: all clean help

help:
ifeq ($(CAT),cat)       
        cat readme.txt
endif

all: out out/common.done out/$(TEST).done os_specific_dep
        make -C out $(TEST)

clean:
        make -C generators clean
        make -C generators/java clean
        rm -rf out

out/common.done:
        cd out; cp -sf ../common/*.c .
        cd out; cp -sf ../common/*.h .
        touch out/common.done

# note: the out dependency is present only in the "all" dependency
# (there is some strange case with the updating of the out date that I
# do not know how to resolve...
out:
        mkdir out

# -----------------------------------------------------
#
# Testcase generation

# .FSF Format
# -----------------------

generators/event_gen:
        make -C generators event_gen

out/%.done: loadfile/%.fsf generators/event_gen
        cd out; ../generators/event_gen ../loadfile/$(TEST).fsf
        touch out/$*.done

# .FSF2 Format
# -----------------------

generators/java/Applicazione.class:
        make -C generators/java all

out/%.done: loadfile/%.fsf2 generators/java/Applicazione.class
        cd generators/java; ./java_gen ../../loadfile/$(TEST).fsf2; mv event.c ../../out/
        touch out/$*.done

# other file formats
# -----------------------
out/%.done: loadfile/%.otherformat
        echo Other file formats that are not specified yet...
        touch out/$*.done

include $(OSINCLUDE)