-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile.in
138 lines (104 loc) · 2.63 KB
/
Makefile.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
topsrc = @top_srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
libdir = @libdir@
CC = @CC@
CXX = @CXX@
CFLAGS = @CFLAGS@
INSTALL = @INSTALL@
LN = @LN_S@
HOSTCC = @HOSTCC@
build_gui = @build_gui@
gtk_version = @gtk_version@
build_po = @build_po@
build_doc = @build_docs@
build_addons = @build_addons@
build_editor = @build_editor@
use_xdg = @use_xdg@
ifeq ($(CC),)
CC = gcc
endif
ifeq ($(CXX),)
CXX = g++
endif
ifeq ($(HOSTCC),)
HOSTCC = $(CC)
endif
ifeq ($(build_gui),yes)
GUIDIR = gui
endif
ifeq ($(build_po),yes)
PODIR = po
endif
ifeq ($(build_doc),yes)
DOCDIR = doc
endif
ifeq ($(build_addons),yes)
ADDONSDIR = addons
endif
ifeq ($(build_editor),yes)
EDDIR = editor
endif
ifeq ($(use_xdg),yes)
XDGDIR = xdg
endif
INSTALL_PROGRAM = ${INSTALL} -m 755
INSTALL_DATA = ${INSTALL} -m 644
export
tooldir = $(topsrc)/tools
SUBDIRS = lib cli $(GUIDIR) $(EDDIR) plugin $(PODIR) share $(XDGDIR) $(ADDONSDIR)
ALLSUBDIRS = lib cli gui editor plugin po share tests doc xdg addons
.PHONY : subdirs $(SUBDIRS) clean installdirs install install-strip \
install-man tags dist distclean check buildstamp
subdirs: $(SUBDIRS)
$(SUBDIRS):
$(MAKE) -C $@
pdfdocs:
if [ "x$(DOCDIR)" = "x" ] ; then \
echo "pdfdocs: this target is not enabled" ; else \
$(MAKE) -C $(DOCDIR) ; fi
clean:
for d in $(SUBDIRS) ; do $(MAKE) -C $$d clean; done
$(MAKE) -C utils/emacs clean
rm -f build.h builddate
installdirs:
$(tooldir)/mkinstalldirs $(libdir) $(includedir) $(bindir)
install: $(SUBDIRS) installdirs install-man
for d in $(SUBDIRS) ; do $(MAKE) -C $$d install || exit 1; done
install-strip: $(SUBDIRS) installdirs install-man
for d in $(SUBDIRS) ; do $(MAKE) -C $$d install-strip || exit 1; done
install-doc: pdfdocs
$(MAKE) -C $(DOCDIR) install
install-man:
$(tooldir)/install_man $(tooldir) $(DESTDIR)$(prefix) $(topsrc)/gretl.1
tags:
etags $(topsrc)/lib/src/*.[ch] $(topsrc)/cli/*.[ch] \
$(topsrc)/$(GUIDIR)/*.[ch] $(topsrc)/plugin/*.[ch] \
$(topsrc)/cephes/*.c $(topsrc)/plugin/zipunzip/*.[ch] \
$(topsrc)/plugin/rq/*.[ch] $(topsrc)/$(EDDIR)/*.[ch]
builddate: $(topsrc)/builddate.c
$(HOSTCC) -o $@ $<
buildstamp: builddate
./builddate
dist:
$(tooldir)/makedist
distclean: clean
rm -f config.log config.cache config.status config.h gretl.pc
for d in $(SUBDIRS) $(DOCDIR) apidemo tests osx utils/emacs ; do \
$(MAKE) -C $$d distclean ; done
rm -f gretl_sh libtool Makefile redhat/gretl.spec
check:
$(MAKE) -C tests check
$(MAKE) -C unittests
osx-dist:
$(MAKE) -C osx postinst
# dependencies for parallel builds
lib: buildstamp
cli: lib
share: lib
$(GUIDIR): lib
$(EDDIR): lib
plugin: lib
tests: lib
$(ADDONSDIR): cli