Commit | Line | Data |
---|---|---|
970ed795 EL |
1 | ############################################################################### |
2 | # Copyright (c) 2000-2014 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 | TOPDIR := .. | |
9 | include $(TOPDIR)/Makefile.regression | |
10 | ||
11 | .SUFFIXES: .ttcn .hh | |
12 | .PHONY: all clean dep run | |
13 | ||
14 | TTCN3_LIB = ttcn3$(RT2_SUFFIX)$(DYNAMIC_SUFFIX) | |
15 | ||
16 | TTCN3_MODULES = TucharstrOper.ttcn cstr_content.ttcn Common.ttcn UTF8Testcases.ttcn UTF16Testcases.ttcn UTF32Testcases.ttcn Base64Testcases.ttcn | |
17 | ||
18 | GENERATED_SOURCES = $(TTCN3_MODULES:.ttcn=.cc) | |
19 | GENERATED_HEADERS = $(GENERATED_SOURCES:.cc=.hh) | |
20 | ifdef CODE_SPLIT | |
21 | GENERATED_SOURCES := $(foreach file, $(GENERATED_SOURCES:.cc=), $(addprefix $(file), .cc _seq.cc _set.cc _seqof.cc _setof.cc _union.cc)) | |
22 | endif | |
23 | ||
24 | USER_SOURCES = external.cc | |
25 | ||
26 | OBJECTS = $(GENERATED_SOURCES:.cc=.o) $(USER_SOURCES:.cc=.o) | |
27 | ||
28 | TARGET = TucharstrOper$(EXESUFFIX) | |
29 | ||
30 | all: $(TARGET) | |
31 | ||
32 | $(TARGET): $(GENERATED_SOURCES) $(USER_SOURCES) | |
33 | $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ -L$(TTCN3_DIR)/lib -l$(TTCN3_LIB) -L$(OPENSSL_DIR)/lib -lcrypto $($(PLATFORM)_LIBS) | |
34 | ||
35 | ||
36 | #.ttcn.cc .ttcn.hh: | |
37 | # $(TTCN3_COMPILER) $< | |
38 | ||
39 | $(GENERATED_SOURCES) $(GENERATED_HEADERS): compile | |
40 | @if [ ! -f $@ ]; then $(RM) compile; $(MAKE) compile; fi | |
41 | ||
42 | compile: $(TTCN3_MODULES) $(ASN1_MODULES) | |
43 | $(filter-out -Nold -E, $(TTCN3_COMPILER)) $(COMPILER_FLAGS) $^ | |
44 | touch compile | |
45 | ||
46 | clean distclean: | |
47 | -rm -f $(TARGET) $(OBJECTS) $(GENERATED_HEADERS) \ | |
48 | $(GENERATED_SOURCES) *.log Makefile.bak | |
49 | ||
50 | dep: $(GENERATED_SOURCES) | |
51 | makedepend $(CPPFLAGS) $(GENERATED_SOURCES) | |
52 | ||
53 | run: $(TARGET) config.cfg | |
54 | ./$^ | |
55 | ||
56 | .NOTPARALLEL: | |
57 | ||
58 | ifdef SRCDIR | |
59 | $(foreach src, $(USER_SOURCES), $(eval vpath $(src) $(ABS_SRC))) | |
60 | endif |