-
Notifications
You must be signed in to change notification settings - Fork 22
/
main_in.mk
101 lines (74 loc) · 1.73 KB
/
main_in.mk
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
#
#
#
# Version
VERSION = @VERSION@
VERSIONHI = @VERSIONHI@
VERSIONLO = @VERSIONLO@
VERSIONP = @VERSIONP@
# Programs
SHELL = /bin/sh
CC = @CC@
CPP = @CPP@
RANLIB = @RANLIB@
INSTALL = @INSTALL@
AUTOCONF = @AUTOCONF@
# Directories
PRJDIR = .
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
libdir = @libdir@
datadir = @datadir@
datarootdir = @datarootdir@
includedir = @includedir@
mandir = @mandir@
man1dir = $(mandir)/man1
man2dir = $(mandir)/man2
infodir = @infodir@
srcdir = @srcdir@
# Flags
DEFS = $(subs -DHAVE_CONFIG_H,,@DEFS@)
CPPFLAGS = @CPPFLAGS@ -I$(PRJDIR)
CFLAGS = @CFLAGS@
# Compiling entire program or any subproject
# ------------------------------------------
all: checkconf
# Compiling and installing everything and runing test
# ---------------------------------------------------
install: all installdirs
# Deleting all the installed files
# --------------------------------
uninstall:
# Performing self-test
# --------------------
check:
# Performing installation test
# ----------------------------
installcheck:
# Creating installation directories
# ---------------------------------
installdirs:
# Creating dependencies
# ---------------------
dep:
include $(srcdir)/clean.mk
# My rules
# --------
.c.o:
$(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
.y.c:
rm -f $*.cc $*.h
$(YACC) -d $<
mv y.tab.c $*.cc
mv y.tab.h $*.h
.l.c:
rm -f $*.cc
$(LEX) -t $< >$*.cc
# Remaking configuration
# ----------------------
checkconf:
@if [ -f $(PRJDIR)/devel ]; then\
$(MAKE) -f $(srcdir)/conf.mk srcdir="$(srcdir)" freshconf;\
fi
# End of main_in.mk/main.mk