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 | # Delic, Adam | |
11 | # Raduly, Csaba | |
12 | # Szabados, Kristof | |
13 | # | |
14 | ############################################################################## | |
970ed795 EL |
15 | # Makefile for build and install nedit and xemacs additions |
16 | # | |
17 | # | |
18 | ||
19 | TOP := ../.. | |
20 | include ../../Makefile.cfg | |
21 | ||
22 | SUBDIR = build | |
23 | DEPFILES = $(SUBDIR)/Makefile $(SUBDIR)/config.h $(SUBDIR)/config.status | |
24 | CONFIGURING = configuring | |
25 | UPPERCFG = ../../Makefile.cfg | |
26 | ||
27 | ifeq ($(DEBUG), no) | |
28 | INSTALL = install-strip | |
29 | else | |
30 | INSTALL = install | |
31 | endif | |
32 | ||
33 | # Variable wrappers | |
34 | # make sure "configure" doesn't get -Werror | |
35 | CFLAGS=$(filter-out -Werror,$(CCFLAGS) $(CPPFLAGS)) -Wno-unused-value | |
36 | EXEEXT=$(EXESUFFIX) | |
37 | prefix=$(TTCN3_DIR) | |
38 | mandir=$(MANDIR) | |
39 | # For MinGW only | |
40 | bindir=$(BINDIR) | |
41 | ||
42 | ifeq ($(PLATFORM), WIN32) | |
43 | # Help "configure" find ncurses headers on Cygwin 1.7 | |
44 | CPPFLAGS+=-I/usr/include/ncurses | |
45 | endif | |
46 | ||
47 | # Override make options for ctags' autoconf | |
48 | OPTIONS =MINGW CPPFLAGS CC CCFLAGS CCDEPFLAG CXXDEPFLAG EXEEXT CFLAGS LDFLAGS prefix mandir | |
49 | ifdef MINGW | |
50 | OPTIONS+=bindir | |
51 | endif | |
52 | ||
53 | # path and name of 'config.site' | |
54 | #config_site = config.site | |
55 | ||
56 | CONFIGOPTIONS = $(foreach m, $(OPTIONS), $(m)='$($m)') | |
57 | ||
58 | ifdef SRCDIR | |
59 | CONFIG_PARAMS := --srcdir=$(SRCDIR)/mctr2/editline/libedit | |
60 | else | |
61 | SRCDIR := $(ABS_TOP) | |
62 | endif | |
63 | ||
64 | all run: $(DEPFILES) | |
65 | $(MAKE) -C $(SUBDIR) all | |
66 | ||
67 | clean: | |
68 | - cd $(SUBDIR) && $(MAKE) $@ || exit | |
69 | ||
70 | distclean: | |
71 | rm -rf $(SUBDIR) | |
72 | rm -f $(CONFIGURING) $(DEPFILES) | |
73 | ||
74 | dep: $(DEPFILES) | |
75 | ||
76 | $(DEPFILES): $(UPPERCFG) $(CONFIGURING) | |
77 | ||
78 | $(CONFIGURING): $(UPPERCFG) | |
79 | @touch $(SRCDIR)/mctr2/editline/libedit/*.m4 | |
80 | @touch $(SRCDIR)/mctr2/editline/libedit/configure | |
81 | @touch $(SRCDIR)/mctr2/editline/libedit/config.h.in | |
82 | mkdir -p $(SUBDIR) | |
83 | @echo Running 'configure' script... | |
84 | cd $(SUBDIR) && $(CONFIGOPTIONS) $(SRCDIR)/mctr2/editline/libedit/configure $(CONFIG_PARAMS) | |
85 | @touch $(CONFIGURING) | |
86 | ||
87 | .PHONY: all install tags dep clean distclean |