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