Commit | Line | Data |
---|---|---|
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 | ############################################################################### | |
8 | # Main Makefile for the TTCN-3 Test Executor | |
9 | # For use with GNU make only. | |
10 | ||
11 | TOP := . | |
12 | include $(TOP)/Makefile.cfg | |
13 | ||
14 | # Dirlist for "all", "clean", "distclean" | |
15 | ALLDIRS := common compiler2 repgen xsdconvert | |
16 | ||
17 | ifndef MINGW | |
18 | ALLDIRS += core core2 mctr2 loggerplugins | |
19 | endif | |
20 | ||
21 | # JNI not supported on Cygwin or Mingw | |
22 | ifneq ($(PLATFORM), WIN32) | |
23 | ifeq ($(JNI), yes) | |
24 | ALLDIRS += JNI | |
25 | endif | |
26 | endif | |
27 | ||
28 | #ALLDIRS += ctags | |
29 | ||
30 | # Dirlist for "dep", "tags" | |
31 | DEPDIRS := $(ALLDIRS) | |
32 | ||
33 | ALLDIRS += usrguide | |
34 | ||
35 | # Dirlist for "install" | |
36 | INSTALLDIRS := $(ALLDIRS) | |
37 | ||
38 | INSTALLDIRS += etc help hello | |
39 | ||
40 | ########################################################### | |
41 | ||
42 | all run clean distclean: | |
43 | @for dir in $(ALLDIRS); do \ | |
44 | $(MAKE) -C $$dir $@ || exit; \ | |
45 | done | |
46 | ||
47 | dep tags: | |
48 | @for dir in $(DEPDIRS); do \ | |
49 | $(MAKE) -C $$dir $@ || exit; \ | |
50 | done | |
51 | ||
52 | install: | |
53 | if test -h $(TTCN3_DIR); then \ | |
54 | echo $(TTCN3_DIR) is a symlink, you cannot be serious; exit 1; fi | |
55 | ifdef MINGW | |
56 | $(info cross your fingers...) | |
57 | endif | |
58 | -rm -rf $(TTCN3_DIR) | |
59 | ifeq ($(INCLUDE_EXTERNAL_LIBS), yes) | |
60 | mkdir -p $(TTCN3_DIR)/lib | |
61 | cp -d $(OPENSSL_DIR)/lib/libcrypto.so* $(TTCN3_DIR)/lib | |
62 | cp -d $(XMLDIR)/lib/libxml2.so* $(TTCN3_DIR)/lib | |
63 | endif | |
64 | @for dir in $(INSTALLDIRS); do \ | |
65 | $(MAKE) -C $$dir $@ || exit; \ | |
66 | done | |
67 | ifeq ($(LICENSING), yes) | |
68 | mkdir -p $(ETCDIR)/license | |
69 | cp license/license.dat $(ETCDIR)/license | |
70 | endif | |
71 | chmod -R +r,go-w $(TTCN3_DIR) | |
72 | ||
73 | # check is the standard GNU target for running tests | |
74 | # (avoids clash with shell builtin 'test') | |
75 | check: | |
76 | make -C regression_test report | |
77 | ||
78 | ifneq (,$(findstring prereq,$(MAKECMDGOALS))) | |
79 | # Export all variables into the environment for the prereq target | |
80 | export | |
81 | endif | |
82 | ||
83 | ||
84 | # no need to include Makefile.genrules | |
85 | ||
86 | .PHONY: all clean distclean dep tags install psi dox check confess prereq | |
87 | ||
88 | ||
89 | Makefile.personal: SHELL:=/bin/bash | |
90 | Makefile.personal: | |
91 | if [ -f $(TOP)/makefiles/$@.$${HOSTNAME:=$${COMPUTERNAME}} ]; then ln -s $(TOP)/makefiles/$@.$${HOSTNAME} $@; else touch $@; fi |