blob: f20631e2f221bd9316bf26858771a8f7a303e7a5 (
plain) (
blame)
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
|
#
#
#
# Version
VERSION = 0.0.0
VERSIONHI = 0
VERSIONLO = 0
VERSIONP = 0
# Programs
SHELL = /bin/sh
CC = gcc
CPP = gcc -E
RANLIB = ranlib
INSTALL = /usr/bin/install -c
AUTOCONF = autoconf
# Directories
PRJDIR = .
prefix = /usr/local
exec_prefix = ${prefix}
bindir = ${exec_prefix}/bin
libdir = ${exec_prefix}/lib
datadir = ${datarootdir}
datarootdir = ${prefix}/share
includedir = ${prefix}/include
mandir = ${datarootdir}/man
man1dir = $(mandir)/man1
man2dir = $(mandir)/man2
infodir = ${datarootdir}/info
srcdir = .
# Flags
DEFS = $(subs -DHAVE_CONFIG_H,,-DHAVE_CONFIG_H)
CPPFLAGS = -I$(PRJDIR)
CFLAGS = -pipe -ggdb -g -Og
# 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
|