-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
181 lines (140 loc) · 4.67 KB
/
Makefile
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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
# Makefile automatically generated, do not edit!
# This output (only this Makefile) is Public Domain.
#
#@MD5TINOIGN@ Creation date: Wed Jul 29 18:16:10 CEST 2020
#
# This file is based on following files:
#@MD5TINOIGN@ 1: Makefile.tino
#@MD5TINOIGN@ 2: tino/Makefile.proto
#
#@MD5TINOIGN@ included: Makefile.tino
#
PROGS=ddrescue-verify
OBJS=
INSTALLBIN=
INSTALLSBIN=
INSTALLLIB=
INSTALLETC=
INSTALLMAN=
INSTALLSMAN=
INSTALLINF=
INSTALLSINF=
ADD_CFLAGS=
ADD_CCFLAGS=
ADD_LDFLAGS=
ADD_LDLIBS=
CLEAN=
CLEANDIRS=
DISTCLEAN=
TINOCOPY=
INSTALLPATH=/usr/local
#
#@MD5TINOIGN@ included: tino/Makefile.proto
#
# Automatically generated from "PROGS" above
PROG1=ddrescue-verify
# Override those in Makefile.tino if needed:
STD_CFLAGS=-g -Wall -Wno-unused-function -O3 -Wno-error=unused-value -Wno-error=unused-function
STD_CCFLAGS=-g -Wall -Wno-unused-function -O3 -Wno-error=unused-value -Wno-error=unused-function
STD_LDFLAGS=
STD_LDLIBS=
BINPATH=bin
SBINPATH=sbin
LIBPATH=lib
ETCPATH=etc
MANPATH=man
SMANPATH=share/man
INFPATH=info
SINFPATH=share/info
# Except for the compiler generated dependencies at the end
# from here no changes shall be needed.
CFLAGS=$(DBG_FLAGS) $(DBG_CFLAGS) $(STD_CFLAGS) $(ADD_CFLAGS) -I"$(HERE)"
CXXFLAGS=$(DBG_CCFLAGS) $(STD_CCFLAGS) $(ADD_CCFLAGS) -I"$(HERE)"
LDFLAGS=$(DBG_LDFLAGS) $(STD_LDFLAGS) $(ADD_LDFLAGS)
LDLIBS=$(DBG_LDLIBS) $(STD_LDLIBS) $(ADD_LDLIBS)
VERSIONFILE=$(PROG1)_version
VERSIONNAME=$(VERSIONFILE)
VERSIONEXT=h
COMMON= \
$(VERSIONFILE).$(VERSIONEXT) \
$(TINOINC) \
$(TINOLIB) \
GAWK=awk
TOUCH=touch
MKDIR=mkdir
CP=cp
STRIP=strip
HERE=$(PWD)
# Semi-automatically generated for CygWin (*.exe)
PROGS_EXE= \
$(PROG1).exe \
.PHONY: all static install it clean distclean dist tar diff always
# Targets considered to work for all systems with GNU MAKE and GNU AWK
all:: $(SUBDIRS) $(PROGS)
test:: all Tests
$(PWD)/tino/Makefile-tests.sh Tests
# To use this you need to do:
# ln -s tinolib/diet .
# make static
# This is experimental.
static::
[ -f diet.distignore~ ] || $(MAKE) clean
$(TOUCH) diet.distignore~
[ ! -d diet ] || $(MAKE) -C diet diet
[ ! -d diet ] || $(MAKE) CC="$(PWD)/diet/tinodiet.sh --tinodiet"
[ -d diet ] || $(MAKE) CC="$(PWD)/tino/Makefile-diet.sh --tinodiet"
Makefile: Makefile.md5
$(TOUCH) Makefile
Makefile.md5: $(VERSIONFILE).$(VERSIONEXT) always
@[ -z '$(HERE)' ] || $(GAWK) -vHERE="$(HERE)" -vMAKE="$(MAKE)" -vTINOCOPY="$(TINOCOPY)" 'BEGIN { \
if ((getline < "tino/Makefile")>0 && \
(getline < "tino/Makefile.proto")>0 && \
(getline < "tino/Makefile.awk")>-1) \
system(MAKE " -C tino tino HERE='\''" HERE "'\'' TINOCOPY='\''" TINOCOPY "'\''"); \
else if ((getline < "Makefile.md5")<0) \
printf "" >"Makefile.md5"; \
}'
$(VERSIONFILE).h: VERSION
$(GAWK) -vPROG="$(VERSIONNAME)" '{ gsub(/-/,"_",PROG); print "#define " toupper(PROG) " \"" $$0 "\"" }' VERSION > "$(VERSIONFILE).h"
$(VERSIONFILE).py: VERSION
$(GAWK) -vPROG="$(VERSIONNAME)" '{ gsub(/-/,"_",PROG); print "#"; print ""; print toupper(PROG) "=\"" $$0 "\"" }' VERSION > "$(VERSIONFILE).py"
# Poor man's install
# Generated from PROGS and INSTALL* above
install::
$(RM) "$(INSTALLPATH)/bin/$(PROG1)"
$(MKDIR) -pm755 "$(INSTALLPATH)/bin"
$(CP) "$(PROG1)" "$(INSTALLPATH)/bin/$(PROG1)"
$(STRIP) "$(INSTALLPATH)/bin/$(PROG1)"
# Special targets considered to work for all unix like systems
# like CygWin
it:: all
[ ".$(PWD)" != ".$(HERE)" ] || [ -f VERSION ] || \
{ UP="`dirname "$(HERE)"`"; $(MAKE) -C"$$UP" it HERE="$$UP"; }
clean::
$(RM) *.o *.d *~ .*~ */*~ $(CLEAN)
-$(MAKE) -C tino clean HERE="$(HERE)"
distclean:: clean
$(RM) "$(VERSIONFILE).h" $(PROGS) $(PROGS_EXE) $(DISTCLEAN)
$(RM) core core.* .#*
-$(MAKE) -C tino distclean HERE="$(HERE)"
# Special targets in presence of tinolib
# (subdirectory tino)
dist:: distclean
-$(MAKE) -C tino dist HERE="$(HERE)" DEBUGS="$(DBG_CFLAGS)$(DBG_LDFLAGS)$(DBG_LDLIBS)"
tar:: distclean
-$(MAKE) -C tino tar HERE="$(HERE)"
diff::
-$(MAKE) -C tino diff HERE="$(HERE)"
# Automatically generated from $(SUBDIRS):
# automatically generated dependencies
$(PROG1).o: $(COMMON)
$(PROG1): $(PROG1).o $(OBJS) $(LIBS)
# compiler generated dependencies, remove if incorrect
# included: ddrescue-verify.d
$(PROG1).o: ddrescue-verify.c tino/alarm.h tino/file.h \
tino/sysfix.h tino/sysfix_cygwin.h tino/sysfix_diet.h \
tino/sysfix_linux.h tino/sysfix_osx.h tino/type.h tino/fatal.h tino/ex.h \
tino/arg.h tino/alloc.h tino/debug.h tino/err.h tino/signals.h \
tino/buf_line.h tino/buf.h tino/codec.h tino/getopt.h tino/scale.h \
tino/auxbuf.h tino/md5.h ddrescue-verify_version.h
# end