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