4bd5e8e61f1f57f18c532ac2d7666ecff6e08dcf
[deliverable/titan.core.git] / regression_test / compileonly / typeInstantiation / Makefile
1 ##############################################################################
2 # Copyright (c) 2000-2016 Ericsson Telecom AB
3 # All rights reserved. This program and the accompanying materials
4 # are made available under the terms of the Eclipse Public License v1.0
5 # which accompanies this distribution, and is available at
6 # http://www.eclipse.org/legal/epl-v10.html
7 #
8 # Contributors:
9 # Balasko, Jeno
10 # Delic, Adam
11 # Raduly, Csaba
12 # Szabados, Kristof
13 # Szabo, Janos Zoltan – initial implementation
14 #
15 ##############################################################################
16 TOPDIR := ../..
17 include $(TOPDIR)/Makefile.regression
18
19 .PHONY: all clean dep
20
21 TTCN3_LIB := ttcn3$(RT2_SUFFIX)$(DYNAMIC_SUFFIX)
22
23 MODULES := A.asn B.asn
24
25 GENERATED_SOURCES := $(MODULES:.asn=.cc)
26 GENERATED_HEADERS := $(GENERATED_SOURCES:.cc=.hh)
27 ifdef CODE_SPLIT
28 GENERATED_SOURCES := $(foreach file, $(GENERATED_SOURCES:.cc=), $(addprefix $(file), .cc _seq.cc _set.cc _seqof.cc _setof.cc _union.cc))
29 endif
30
31 OBJECTS := $(GENERATED_SOURCES:.cc=.o)
32
33 TARGET := TtypeInstantiation$(EXESUFFIX)
34
35 all run: $(TARGET) ;
36
37 $(TARGET): $(GENERATED_SOURCES) $(USER_SOURCES)
38 $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ -L$(TTCN3_DIR)/lib -l$(TTCN3_LIB) \
39 -L$(OPENSSL_DIR)/lib -lcrypto $($(PLATFORM)_LIBS)
40
41 $(GENERATED_SOURCES) $(GENERATED_HEADERS): compile
42 @if [ ! -f $@ ]; then $(RM) compile; $(MAKE) compile; fi
43
44 compile: $(MODULES)
45 $(TTCN3_COMPILER) $(COMPILER_FLAGS) $^ - $?
46 touch $@
47
48 clean distclean:
49 -$(RM) $(TARGET) $(OBJECTS) $(GENERATED_HEADERS) \
50 $(GENERATED_SOURCES) compile *.log Makefile.bak
51
52 dep: $(GENERATED_SOURCES)
53 makedepend $(CPPFLAGS) $(USER_SOURCES) $(GENERATED_SOURCES)
This page took 0.029939 seconds and 4 git commands to generate.