makefile.tmplt 2.02 KB
Newer Older
1
2
3
4
5
@@-- The following tags are available in this template:
@@--
@@-- @_Function_Names_@      : Combined table: list of fuction names...
@@-- @_Language_@            : ... and corresponding implementation language
@@-- @_Unique_Languages_@    : List of all languages used in the system
6
7
@@-- @_ASN1_Files_@          : List of all ASN.1 files
@@-- @_ASN1_Modules_@        : List of all ASN.1 modules
Maxime Perrotin's avatar
Maxime Perrotin committed
8
9
all: compile-all-linux

10
dataviews:
Maxime Perrotin's avatar
Maxime Perrotin committed
11
12
13
14
15
16
17
18
19
20
	mkdir -p dataview
	@@-- Create dataview-uniq.asn
	@@INLINE(	)( )(\n)@@
        cat
        @@TABLE@@
           @_ASN1_Files_@ 
        @@END_TABLE@@
        > dataview/dataview-uniq.asn
	@@END_INLINE@@
	@@-- Then generate Dataviews once per target language
21
	@@TABLE@@
Maxime Perrotin's avatar
Maxime Perrotin committed
22
        @@IF@@ @_Unique_Languages_@ /= "GUI"
23
	@@IF@@ @_Unique_Languages_@ = "Ada" or @_Unique_Languages_@ = "SDL"
Maxime Perrotin's avatar
Maxime Perrotin committed
24
	mkdir dataview/Ada && mono $(shell which asn1.exe) -Ada -typePrefix asn1Scc -o dataview/Ada dataview/dataview-uniq.asn || :
25
	cd dataview/Ada && rm -f gnat.cfg GPS_project.gpr IgnoredExaminerWarnings.wrn runSpark.sh
Maxime Perrotin's avatar
Maxime Perrotin committed
26
	@@ELSIF@@ @_Unique_Languages_@ = "C" or @_Unique_Languages_@ = "CPP"
Maxime Perrotin's avatar
Maxime Perrotin committed
27
	mkdir dataview/C && mono $(shell which asn1.exe) -c -typePrefix asn1Scc -o dataview/C dataview/dataview-uniq.asn || :
Maxime Perrotin's avatar
Maxime Perrotin committed
28
	@@ELSE@@
29
	mkdir -p dataview/@_Unique_Languages_@
Maxime Perrotin's avatar
Maxime Perrotin committed
30
	asn2dataModel -o dataview/@_Unique_Languages_@ -to@_Unique_Languages_@ dataview/dataview-uniq.asn
31
32
33
34
35
	@@END_IF@@
	@@END_IF@@
        @@END_TABLE@@
	@@-- Then symlink the files for each function
	@@TABLE@@
Maxime Perrotin's avatar
Maxime Perrotin committed
36
37
38
	@@IF@@ @_Language_@ = "Ada"
	ln -fs ${PWD}/dataview/Ada/*.ads @_LOWER:Function_Names_@/Ada/src
	@@ELSIF@@ @_Language_@ = "C" or @_Language_@ = "CPP"
Maxime Perrotin's avatar
Maxime Perrotin committed
39
	ln -fs ${PWD}/dataview/C/*.h @_LOWER:Function_Names_@/@_Language_@/src
Maxime Perrotin's avatar
Maxime Perrotin committed
40
41
	@@ELSIF@@ @_Language_@ = "SDL"
	ln -fs ${PWD}/dataview/dataview-uniq.asn @_LOWER:Function_Names_@/@_Language_@/src
Maxime Perrotin's avatar
Maxime Perrotin committed
42
	@@ELSIF@@ @_Language_@ /= "GUI"
43
44
	ln -fs ${PWD}/dataview/@_Language_@/* @_LOWER:Function_Names_@/@_Language_@/src
	@@END_IF@@
45
	@@END_TABLE@@
46

Maxime Perrotin's avatar
Maxime Perrotin committed
47
48
49
50
compile-all-linux: dataviews
	@@TABLE@@
	cd @_LOWER:Function_Names_@/@_Language_@ && make compile-linux
	@@END_TABLE@@