Debian Codegraph @

common/Makefile

raw symbols ◀ ▶
Source reconstructed at patch state 0 of 1 — not the installed (fully patched) source.
1 Debian patch touch this file
1 ##############################################################################
2 # Copyright (c) 2000-2021 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 v2.0
5 # which accompanies this distribution, and is available at
6 # https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html
7 #
8 # Contributors:
9 #
10 # Baji, Laszlo
11 # Balasko, Jeno
12 # Baranyi, Botond
13 # Beres, Szabolcs
14 # Csondes, Tibor
15 # Delic, Adam
16 # Forstner, Matyas
17 # Kovacs, Ferenc
18 # Ormandi, Matyas
19 # Raduly, Csaba
20 # Szabo, Janos Zoltan – initial implementation
21 # Zalanyi, Balazs Andor
22 #
23 ##############################################################################
24 # Makefile for the common directory of the TTCN-3 Test Executor
25
26 TOP := ..
27 include $(TOP)/Makefile.cfg
28
29 # Generating git_version.c according to GIT_COMMIT_ID
30 GIT_HASH=`git describe --always --dirty --match 'NOT A TAG'`
31 ifeq ($(GIT_COMMIT_ID), no)
32 GIT_HASH=""
33 endif
34 $(shell printf "// this file was generated by make\n#include \"version_internal.h\"\n\nchar const *const GIT_COMMIT_ID = \"${GIT_HASH}\";\n" > git_version.c.tmp)
35 $(shell if diff -q git_version.c.tmp git_version.c >/dev/null 2>&1; then \
36 rm git_version.c.tmp; \
37 else \
38 mv git_version.c.tmp git_version.c; \
39 fi)
40
41 TOBECLEANED := git_version.c
42
43 TARGETS :=
44
45 # The origin of GENERATED_SOURCES
46 ORIGINATORS := pattern_la.l pattern_p.y pattern_uni.y config_preproc_la.l config_preproc_p.y
47
48 GENERATED_SOURCES := pattern_la.cc pattern_p.cc pattern_uni.cc config_preproc_la.cc config_preproc_p.tab.cc git_version.c
49
50 # Sources in the CVS
51
52 STATIC_SOURCES := memory.c new.cc userinfo.c path.c config_preproc.cc Quadruple.cc \
53 Path2.cc ModuleVersion.cc JSON_Tokenizer.cc UnicharPattern.cc openssl_version.c
54
55 ifndef MINGW
56 STATIC_SOURCES += NetworkHandler.cc
57 endif
58
59 ifeq ($(USAGE_STATS), yes)
60 STATIC_SOURCES += usage_stats.cc
61 endif
62
63 ifeq ($(LICENSING), yes)
64 STATIC_SOURCES += license.c
65 ifeq ($(PLATFORM), WIN32)
66 STATIC_SOURCES += hostid.c
67 TARGETS += hostid$(EXESUFFIX)
68 endif
69 ifeq ($(PLATFORM), INTERIX)
70 STATIC_SOURCES += hostid.c
71 TARGETS += hostid$(EXESUFFIX)
72 endif
73 endif
74
75 SOURCES := $(STATIC_SOURCES) $(GENERATED_SOURCES)
76
77 GENERATED_HEADERS := pattern_p.hh pattern_uni.hh config_preproc_p.tab.hh
78
79 GENERATED_OTHERS := pattern_p.output pattern_uni.output lex.backup
80
81 OBJECTS := $(patsubst %.cc,%.o,$(patsubst %.c,%.o,$(SOURCES)))
82
83 DEPFILES := $(patsubst %.cc,%.d,$(patsubst %.c,%.d,$(SOURCES)))
84
85 SUBDIRS :=
86
87 CPPFLAGS += -D_REENTRANT
88
89 ifdef REGEX_DIR
90 CPPFLAGS += -I$(REGEX_DIR)/include
91 endif
92
93 all run: $(OBJECTS) $(TARGETS)
94
95 install: $(OBJECTS) $(TARGETS)
96 ifdef MINGW
97 @echo Skipped ${CURDIR} for MinGW
98 else
99 mkdir -p $(INCDIR)
100 cp version.h memory.h platform.h ttcn3float.hh pattern.hh CharCoding.hh JSON_Tokenizer.hh $(INCDIR)
101 ifeq ($(DEBUG), yes)
102 cp dbgnew.hh $(INCDIR)
103 endif
104 ifneq ($(TARGETS), )
105 ifeq ($(DEBUG), no)
106 $(STRIP) $(TARGETS)
107 endif
108 mkdir -p $(BINDIR)
109 cp $(TARGETS) $(BINDIR)
110 endif
111 endif
112
113 hostid$(EXESUFFIX): hostid.o license.o memory.o
114 $(CC) $(LDFLAGS) -o $@ $^ $(LICENSE_LIBS) $(MINGW_LIBS)
115
116 pattern_la.cc: pattern_la.l
117 $(FLEX) $(FLEXFLAGS) -o$@ $<
118
119 pattern_p.cc pattern_p.hh: pattern_p.y
120 $(BISON) $(BISONFLAGS) $<
121
122 pattern_uni.cc pattern_uni.hh: pattern_uni.y
123 $(BISON) $(BISONFLAGS) $<
124
125 config_preproc_la.cc: config_preproc_la.l
126 $(FLEX) $(FLEXFLAGS) -o$@ $<
127
128 config_preproc_p.tab.cc config_preproc_p.tab.hh: config_preproc_p.y
129 $(BISON) $(BISONFLAGS) -o config_preproc_p.tab.cc -p config_process_ $<
130
131 # Target-specific variable alteration
132 # Target-specific += causes make 3.79.1 to crash, hence this old style
133 ifdef OPENSSL_DIR
134 ifneq ($(OPENSSL_DIR), default)
135 license.o license.d: CPPFLAGS := $(CPPFLAGS) -I$(OPENSSL_DIR)/include
136 openssl_version.o openssl_version.d: CPPFLAGS := $(CPPFLAGS) -I$(OPENSSL_DIR)/include
137 endif
138 endif
139
140 include ../Makefile.genrules
141
142
143 #vpath pattern_la.l $(ABS_SRC)
144 #vpath pattern_p.y $(ABS_SRC)
145 #vpath pattern_uni_lex.l $(ABS_SRC)
146 #vpath pattern_uni.y $(ABS_SRC)
147 #vpath config_preproc_la.l $(ABS_SRC)
148 #vpath config_preproc_p.y $(ABS_SRC)
149
150 # no vpath for GENERATED_SOURCES !
151