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