Update README.md
[deliverable/titan.core.git] / xsdconvert / Makefile
CommitLineData
d44e3c4f 1##############################################################################
2# Copyright (c) 2000-2016 Ericsson Telecom AB
970ed795
EL
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
d44e3c4f 7#
8# Contributors:
9#
10# Balasko, Jeno
11# Godar, Marton
12# Pilisi, Gergely
13# Raduly, Csaba
14# Szabo, Bence Janos
15#
16##############################################################################
970ed795
EL
17TOP := ..
18include $(TOP)/Makefile.cfg
19
20SOURCES := converter.cc \
21 XMLParser.cc TTCN3Module.cc TTCN3ModuleInventory.cc \
3abe9331 22 RootType.cc SimpleType.cc AttributeType.cc ComplexType.cc \
970ed795
EL
23 Annotation.cc ImportStatement.cc \
24 PredefinedModules.cc GeneralFunctions.cc \
25 Mstring.cc
26
27# No generated sources
28STATIC_SOURCES := $(SOURCES)
29
30HEADERS := $(SOURCES:.cc=.hh)
31
32
33OBJECTS := $(SOURCES:.cc=.o) \
34 $(TOP)/common/new.o \
35 $(TOP)/common/memory.o
36
37ifeq ($(LICENSING), yes)
38 OBJECTS += $(TOP)/common/license.o
39endif
40
41
42TARGETS := xsd2ttcn$(EXESUFFIX)
43
44DEPFILES := $(patsubst %.cc,%.d,$(patsubst %.c,%.d,$(SOURCES)))
45
46ifdef XMLDIR
47ifeq ($(XMLDIR), default)
48 # libxml2 headers supplied by the system are usually in /usr/include/libxml2,
49 # so a -I is required. Rename XMLDIR for use in the common case.
50 XMLDIR := /usr
51 # do not add -L/usr/lib to LDFLAGS, it's redundant
52else
53 LDFLAGS += -L$(XMLDIR)/lib
54endif
55 # Always add to CPPFLAGS, even if "default"
56 CPPFLAGS += -I$(XMLDIR)/include/libxml2
57endif
58
59ifdef OPENSSL_DIR
60ifneq ($(OPENSSL_DIR), default)
61 CPPFLAGS += -I$(OPENSSL_DIR)/include
62 LDFLAGS += -L$(OPENSSL_DIR)/lib
63endif
64endif
65
66
67
68ifeq ($(PLATFORM),INTERIX)
69 # to get the "right" iconv, used by libxml2
70 CPPFLAGS += -I/usr/local/include
71endif
72
73# libraries for the linker
74LDLIBS += -lxml2 -lcrypto
75
51fa56b9 76ifdef MINGW
77LDLIBS += -lregex
78endif
79
970ed795
EL
80all run: $(TARGETS) $(PROGRAMS)
81
82xsd2ttcn$(EXESUFFIX): $(OBJECTS)
83 $(CXX) $(LDFLAGS) -o $@ $(OBJECTS) $(LDLIBS) $(MINGW_LIBS)
84
85install: $(TARGETS)
86ifdef MINGW
87 mkdir -p $(TTCN3_DIR)/programs
88 cp $(TARGETS) $(TTCN3_DIR)/programs
89else
90 mkdir -p $(BINDIR)
91 cp -f $(TARGETS) $(BINDIR)
92endif
93
d44e3c4f 94include $(TOP)/Makefile.genrules
This page took 0.026793 seconds and 5 git commands to generate.