Commit | Line | Data |
---|---|---|
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 | # Balasko, Jeno | |
10 | # Forstner, Matyas | |
11 | # Horvath, Gabriella | |
12 | # Koppany, Csaba | |
13 | # Ormandi, Matyas | |
14 | # Raduly, Csaba | |
15 | # Szabo, Janos Zoltan – initial implementation | |
16 | # Tatarka, Gabor | |
17 | # | |
18 | ############################################################################## | |
970ed795 EL |
19 | # Makefile for the TTCN-3 log formatter, log merger and HTML report generator |
20 | ||
21 | TOP := .. | |
22 | include $(TOP)/Makefile.cfg | |
23 | ||
24 | ifndef MINGW | |
25 | TARGETS := ttcn3_logmerge$(EXESUFFIX) ttcn3_logfilter$(EXESUFFIX) ttcn3_logformat$(EXESUFFIX) ttcn3_repgen$(EXESUFFIX) | |
26 | endif | |
27 | ||
28 | ORIGINATORS := parser.l logformat.l | |
29 | ||
30 | GENERATED_SOURCES := logformat.c parser.c | |
31 | ||
32 | STATIC_SOURCES := logfilter.c logmerge.c repgen.c | |
33 | ||
34 | SOURCES := $(STATIC_SOURCES) $(GENERATED_SOURCES) | |
35 | ||
36 | GENERATED_HEADERS := | |
37 | ||
38 | GENERATED_OTHERS := lex.backup | |
39 | ||
40 | OBJECTS := $(patsubst %.cc,%.o,$(patsubst %.c,%.o,$(SOURCES))) | |
41 | ||
42 | COMMON_OBJECTS := ../common/memory.o | |
43 | ||
44 | ifeq ($(LICENSING), yes) | |
45 | COMMON_OBJECTS += ../common/license.o | |
46 | endif | |
47 | ||
48 | DEPFILES := $(patsubst %.cc,%.d,$(patsubst %.c,%.d,$(SOURCES))) | |
49 | ||
50 | SUBDIRS := | |
51 | ||
52 | MANPAGES1 := ttcn3_logmerge.1 ttcn3_logfilter.1 ttcn3_logformat.1 | |
53 | ||
54 | all run: $(TARGETS) | |
55 | ||
56 | install: $(TARGETS) | |
57 | ifdef MINGW | |
58 | @echo Skipped ${CURDIR} for MinGW | |
59 | else | |
60 | ifeq ($(DEBUG), no) | |
61 | $(STRIP) $(TARGETS) | |
62 | endif | |
63 | mkdir -p $(BINDIR) | |
64 | cp $(TARGETS) $(BINDIR) | |
65 | $(RM) $(BINDIR)/logformat$(EXESUFFIX) $(BINDIR)/repgen$(EXESUFFIX) | |
66 | ln -s ttcn3_logformat$(EXESUFFIX) $(BINDIR)/logformat$(EXESUFFIX) | |
67 | ln -s ttcn3_repgen$(EXESUFFIX) $(BINDIR)/repgen$(EXESUFFIX) | |
68 | cp $(MANPAGES1) $(MANDIR)/man1 | |
69 | $(RM) $(MANDIR)/man1/logformat.1 | |
70 | ln -s ttcn3_logformat.1 $(MANDIR)/man1/logformat.1 | |
71 | endif | |
72 | ||
73 | ttcn3_logmerge$(EXESUFFIX): logmerge.o $(COMMON_OBJECTS) | |
74 | $(CC) $(LDFLAGS) -o $@ $^ $(LICENSE_LIBS) $(MINGW_LIBS) | |
75 | ||
76 | ttcn3_logfilter$(EXESUFFIX): logfilter.o $(COMMON_OBJECTS) | |
77 | $(CC) $(LDFLAGS) -o $@ $^ $(LICENSE_LIBS) $(MINGW_LIBS) | |
78 | ||
79 | ttcn3_logformat$(EXESUFFIX): logformat.o $(COMMON_OBJECTS) | |
80 | $(CC) $(LDFLAGS) -o $@ $^ $(LICENSE_LIBS) $(MINGW_LIBS) | |
81 | ||
82 | ttcn3_repgen$(EXESUFFIX): parser.o repgen.o $(COMMON_OBJECTS) | |
83 | $(CC) $(LDFLAGS) -o $@ $^ $(LICENSE_LIBS) $(MINGW_LIBS) | |
84 | ||
85 | logformat.c: logformat.l | |
86 | $(FLEX) $(FLEXFLAGS) -o$@ $< | |
87 | ||
88 | parser.c: parser.l | |
89 | $(FLEX) $(FLEXFLAGS) -o$@ $< | |
90 | ||
91 | include ../Makefile.genrules |