-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbin.mk
400 lines (382 loc) · 15.6 KB
/
bin.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
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
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
#
# bin.mk (template)
#
# This file is intended for:
# - *-ve.o object files [or LIBNAME .so / ARCHIVE .a, for C JIT], or
# - VE .bin binary blobs [for assembly JIT]
# It is usually set up with a prefix 'all:' target, and changes here
# should go hand in hand with dllbuild.hpp and dllbuild.cpp
#
# Verbosity:
# Hmm. safest for large jobs seems VERBOSE=0 BIN_MK_VERBOSE=0 LC_ALL=C (cmd)
# which seems to play nicely with pstreams. Often I think the build gets
# stuck.
#
# Usage:
# Simple : supply OBJECTS:=<list of object file names> in Makefile
# Robust : ALSO supply OBJECTS_FILE:=FILE1,... where FILE1 contains the list object file names
# (OBJECTS is used for dependencies within 'make', whereas its matching
# OBJECTS_FILE is used to circumvent command line / argv limits of shell commands)
#
# NEW: autocreate an OBJECTS_FILE if it is empty...
#
# Simple usage can break if you have 20 or more long source files, esp. since
# you might produce several objects files per source file by varying compile flags.
#
# Set this to 0 in your environment to make this build quieter
# It controls things different from VERBOSE (make command-echo)
BIN_MK_VERBOSE?=1
# hack: if any OBJECTS are -x86.o, use 'ar' instead of 'nar'
$(info bin.mk OBJECTS ${OBJECTS})
ifeq ($(filter %-x86.o,$(OBJECTS)),)
$(info bin.mk VE library ${LIBNAME})
TARGET:=ve
AR:=nar
NM:=nnm
else
$(info bin.mk x86 library ${LIBNAME})
TARGET:=x86
AR:=ar
NM:=nm
endif
ifeq ($(ARCHIVE),)
ARCHIVE:=$(patsubst %.so,%.a,$(LIBNAME))
endif
# This can be used to jit object files in a "repository", to avoid
# recompiles (untested)
mkfile_path := $(realpath $(lastword $(MAKEFILE_LIST)))
mkfile_dir := $(dir $(mkfile_path))
MEGA_ARCHIVE?=$(abspath $(mkfile_dir)/../libmegajit.a)
MEGA_ARCHIVE_SO?=$(abspath $(mkfile_dir)/../libmegajit.a)
# Example of how to compile a [local copy of] a jit '-vi.c' file
# [copied from ../vednn-ek/test/tmp_cjitConv01/cjitConvFwd_parmstr-vi.c]
# CFLAGS=-I../vednn-ek/test/vednn-ftrace1/include make VERBOSE=1 -f bin.mk cjitConvFwd_parmstr-ve.o
#
# (include path is for vednnx.h, change to suit)
#
#LDFLAGS?=
# Warning: this produces a LOT of output...
# Also, not really sure if --copy-dt-needed-entries does anything with nld
LIBFLAGS?=
ifeq (${TARGET},ve)
ifeq (${BIN_MK_VERBOSE},0)
LIBFLAGS+=-Wl,--copy-dt-needed-entries
else
LIBFLAGS+=-Wl,--verbose -Wl,--trace -Wl,--copy-dt-needed-entries
endif
endif
ifeq (${BIN_MK_VERBOSE},0)
define bin_mk_info
endef
else
$(info BIN_MK_VERBOSE=$(BIN_MK_VERBOSE))
define bin_mk_info
$(info $(1))
endef
endif
# nar accepts @FILE, ncc does not. So we generate .a of -fPIC objects,
# and then convert to .so Makefile $(file ...) trick does not work
#
# Using 'echo' also fails to pass everything into the file,
# and using make's file/foreach commands also did not work out.
#
# NEW: if OBJECTS_FILE is not given, auto-create it (can be slow if thousands of OBJECTS)
#
ifeq (${OBJECTS_FILE},)
OBJECTS_FILE:=$(patsubst %.a,%.OBJECTS,$(ARCHIVE))
# cannot use $$(OBJECTS) anywhere in a command line (it can exceed command line)
# 'foreach' + 'shell' seems safe. make's 'file' command did not work for me
$(OBJECTS_FILE): $(mkfile_path)
rm -f $@
$(foreach L,$(MANY1000),$(shell echo '$L' >> $@))
@echo 'wordcount $@ : '`wc $@`
endif
# if OBJECTS_FILE is a real(?) file, also use @FILE for object file list
ifneq (${OBJECTS_FILE},)
#REAL_OBJECTS_FILE:=$(foreach F,${OBJECTS_FILE},$(realpath $F))
REAL_OBJECTS_FILE:=$(OBJECTS_FILE)
AT_OBJECTS_FILE:=$(patsubst %,@%,$(REAL_OBJECTS_FILE))
.PHONY: ${AT_OBECTS_FILE} # never try to create @FILEs
EXTRA_ARCHIVE_OBJECTS:=
else
# if OBJECTS_FILE empty, ARCHIVE_OBJECTS same as OBJECTS
AT_OBJECTS_FILE:=
REAL_OBJECTS_FILE:=
EXTRA_ARCHIVE_OBJECTS:=$(OBJECTS)
endif
$(info EXTRA_ARCHIVE_OBJECTS=$(EXTRA_ARCHIVE_OBJECTS))
.PRECIOUS: $(ARCHIVE)
# Remember, any OBJECTS_FILE should **duplicate** the 'make' OBJECTS dependencies
$(ARCHIVE): $(REAL_OBJECTS_FILE) $(OBJECTS)
$(AR) rcs $@ $(AT_OBJECTS_FILE) $(EXTRA_ARCHIVE_OBJECTS) \
&& echo 'created $@' || echo 'Trouble creating $@ (continuing)'
$(NM) $@ | wc
ifneq (${BIN_MK_VERBOSE},0)
-ls -l $@; echo '$(NM) wordcount: ' `$(NM) $@ | wc`
endif
ifneq ($(MEGA_ARCHIVE),)
# $(MAKE) $(MEGA_ARCHIVE)
$(AR) rcs $(MEGA_ARCHIVE) $(AT_OBJECTS_FILE) $(ARCHIVE_OBJECTS) \
&& echo ' updated $(MEGA_ARCHIVE)' || echo 'Trouble updating $(MEGA_ARCHIVE) (continuing)'
ifneq (${BIN_MK_VERBOSE},0)
-ls -l lib* $(MEGA_ARCHIVE); echo '$(NM) $(MEGA_ARCHIVE) wordcount: ' `$(NM) $(MEGA_ARCHIVE) | wc`
endif
endif
$(MEGA_ARCHIVE)_first_version: # this created a nested archive, not good
# MEGA_ARCHIVE is "$(MEGA_ARCHIVE)"
-@if [ -f "$(MEGA_ARCHIVE)" ]; then \
echo ' updating MEGA_ARCHIVE $(MEGA_ARCHIVE)'; \
{ echo "open $(MEGA_ARCHIVE)"; echo "replace $(ARCHIVE)"; echo "save"; echo "end"; } \
| $(AR) -M; \
else \
echo ' creating MEGA_ARCHIVE $(MEGA_ARCHIVE)'; \
cp -av $@ $(MEGA_ARCHIVE); \
fi
ifneq (${BIN_MK_VERBOSE},0)
-ls -l lib* $(MEGA_ARCHIVE); echo '$(NM) $(MEGA_ARCHIVE) wordcount: ' `$(NM) $(MEGA_ARCHIVE) | wc`
endif
# mri scripting via TINY also did not remove duplicate objects.
$(MEGA_ARCHIVE)_tiny: $(ARCHIVE)
MEGA_ARCHIVE is "$(MEGA_ARCHIVE)"
-if [ -f "$(MEGA_ARCHIVE)" ]; then \
echo ' creating thin archive $(patsubst %.a,%-megaT.a,$(ARCHIVE))'; \
ar -rcT $(patsubst %.a,%-megaT.a,$(ARCHIVE)) $(MEGA_ARCHIVE) $(ARCHIVE) \
&& echo 'creating new MEGA_ARCHIVE $(patsubst %.a,%-mega.a,$(ARCHIVE))' \
&& { echo 'create $(patsubst %.a,%-mega.a,$(ARCHIVE))'; \
echo 'addlib $(patsubst %.a,%-megaT.a,$(ARCHIVE))'; \
echo 'save'; \
echo 'end'; } \
| $(AR) -M; \
else \
echo ' creating MEGA_ARCHIVE $(MEGA_ARCHIVE)'; \
cp -av $@ $(MEGA_ARCHIVE); \
fi
ifneq (${BIN_MK_VERBOSE},0)
-ls -l lib*; echo '$(NM) wordcount: ' `$(NM) $@ | wc`
endif
# ve attempts
#ncc -o $@ $(LDFLAGS) $(LIBFLAGS) $(filter %-ve.o,$^)
# did not work echo '$(OBJECTS)' | gawk 'BEGIN{RS=" "}//' > [email protected]
# did not create file $(file >[email protected],$(filter %-ve.o,$^))
#ncc -o $@ $(LDFLAGS) $(LIBFLAGS) @[email protected]
#ls -l OBJECTS-ve.list
#
# ncc does not support @FILE for long command lines
#ncc -o $@ $(LDFLAGS) $(LIBFLAGS) @OBJECTS-ve.list
#
$(LIBNAME): $(OBJECTS) ${OBJECTS_FILE}
ifneq (${BIN_MK_VERBOSE},0)
echo "-------- Linking --------"
echo "LDFLAGS = $${LDFLAGS}"
echo "LIBFLAGS = $${LIBFLAGS}"
echo "ARCHIVE $(ARCHIVE)"
echo "LIBNAME $(LIBNAME)"
echo "AT_OBJECTS_FILE $(AT_OBJECTS_FILE)"
echo "MEGA_ARCHIVE $(MEGA_ARCHIVE)"
endif
ifeq (${TARGET},ve)
@#echo "nc++ -shared -o $@ $(LDFLAGS) $(LIBFLAGS) -Wl,--whole-archive $(ARCHIVE) -Wl,--no-whole-archive"
#ncc -shared -o $@ $(LDFLAGS) $(LIBFLAGS) -Wl,--whole-archive $(ARCHIVE) -Wl,--no-whole-archive
#nc++ -shared -o $@ $(LDFLAGS) $(LIBFLAGS) -Wl,--whole-archive $(ARCHIVE) -Wl,--no-whole-archive -lnc++.so
#$(CXXLANG) $(CXXLANG_FLATS) -shared -o $@ $(LDFLAGS) $(LIBFLAGS) ${AT_OBJECTS_FILE}
# Feb 2022 : I notice that at-files are now supported (Yay)
@echo "nc++ -std=c++11 -shared -o $@ $(LDFLAGS) $(LIBFLAGS) ${AT_OBJECTS_FILE}"
nc++ -std=c++11 -shared -o $@ $(LDFLAGS) $(LIBFLAGS) ${AT_OBJECTS_FILE}
else # much simple for x86, gcc supports @file
gcc -shared -o $@ $(LDFLAGS) $(LIBFLAGS) ${AT_OBJECTS_FILE}
endif
ifneq (${BIN_MK_VERBOSE},0)
echo "-------- Linking DONE --------"
# This would assume VE library target !!! -nreadelf -hds $@
echo "-------- Library $(LIBNAME) created in `pwd`"
-ls -l $@; echo '$(NM) wordcount: ' `$(NM) $@ | wc`
endif
#if [ -s "$(MEGA_ARCHIVE_SO)" ]; then \
# ncc -shared -o $(MEGA_ARCHIVE_SO) $(LIBFLAGS) -Wl,--whole-archive $@ $(MEGA_ARCHIVE_SO); \
#fi
# Allow override of default compiler (maybe particular version is required)
# NCC must be used for .S files (nas possibly, if you don't use cpp preprocessor)
# NCC must be used for extended assembly (JIT asm with register calling convention)
# CLANG must be used for vector instrinsics
# No nas methods (C preprocessing assumed)
CC?=ncc
CXX?=nc++
NCC?=ncc
NCXX?=nc++
CLANG?=clang
CXXLANG?=clang++
GCC?=gcc
GCXX?=g++
# Flags can be added to from environment
# clang flags are adjust also by CFLAGS and CXXFLAGS, but
# can be totally overridden from environment if nec.
CFLAGS?=
CXXFLAGS?=
CLANG_FLAGS?=
CXXLANG_FLAGS?=
C86FLAGS?=
CXX86FLAGS?=
$(bin_mk_info Begin with CFLAGS = $(CFLAGS))
$(bin_mk_info Begin with CXXFLAGS = $(CXXFLAGS))
$(bin_mk_info Begin with CLANG_FLAGS = $(CLANG_FLAGS))
$(bin_mk_info Begin with CXXLANG_FLAGS = $(CXXLANG_FLAGS))
CFLAGS:=-O2 -fPIC $(CFLAGS)
CXXFLAGS:=-std=c++11 -O2 -fPIC $(CXXFLAGS)
C86FLAGS:=-O2 $(C86FLAGS)
CXX86FLAGS:=-std=c++11 -O2 $(CXX86FLAGS)
CLANG_FLAGS:=$(CLANG_FLAGS) $(CFLAGS)
CXXLANG_FLAGS:=$(CXXLANG_FLAGS) $(CXXFLAGS)
# remove some flags that need special handling for clang
CLANG_FLAGS:=$(filter-out -O2,$(CLANG_FLAGS))
CXXLANG_FLAGS:=$(filter-out -O2,$(CLANG_FLAGS))
# env flags append to some reasonable defaults
# clang vector instrinsics flags (reuse C[XX]LANG_FLAGS env variables to adjust)
# Here is a recent libvednn impl compilation:
# cd /usr/uhome/aurora/4gi/nlabhpg/work/kruus/vednn-ek/build/src/intrinsic/Convolution/Forward
# && /usr/uhome/aurora/4gi/nlabhpg/.local/bin/clang -DVEDNN_USE_OPENMP
# -I/usr/uhome/aurora/4gi/nlabhpg/work/kruus/vednn-ek/src/intrinsic/..
# -target ve -O3 -mllvm -show-spill-message-vec -fno-vectorize -fno-unroll-loops -fno-slp-vectorize -fno-crash-diagnostics
# -o CMakeFiles/vednn_intrinsic_convolution_forward.dir/direct_default.c.o
# -c /usr/uhome/aurora/4gi/nlabhpg/work/kruus/vednn-ek/src/intrinsic/Convolution/Forward/direct_default.c
CLANG_VI_FLAGS?=-show-spill-message-vec -fno-vectorize -fno-unroll-loops -fno-slp-vectorize -fno-crash-diagnostics
# huh, what is correct? -show-spill-message-vec
# maybe: -fno-unroll-loops
CLANG_FLAGS:=-target linux-ve -O3 -mllvm $(CLANG_VI_FLAGS) $(CLANG_FLAGS)
CXXLANG_FLAGS:=-target linux-ve -O3 -mllvm $(CLANG_VI_FLAGS) $(CXXLANG_FLAGS)
$(bin_mk_info Ending with CFLAGS = $(CFLAGS))
$(bin_mk_info Ending with CXXFLAGS = $(CXXFLAGS))
$(bin_mk_info Ending with CLANG_FLAGS = $(CLANG_FLAGS))
CXXLANG_FLAGS:=$(filter-out -std=c++11,$(CXXLANG_FLAGS))
$(bin_mk_info Ending with CXXLANG_FLAGS = $(CXXLANG_FLAGS))
#
# We will distinguish C files requiring different types of VE compile
# by suffix.
#
# Aurora C: %-ncc.c via ncc (scalar code, extended asm, nas/link frontend)
# and %-clang.c via clang scalar code (want good optimizer)
# and %-vi.c via clang VECTOR INTRINSICS
# x86 C: %-x86.c via gcc, also LIBNAME -x86.so ?
#
# All with CFLAGS/CXXFLAGS
# Assembler outputs are for show, and can omit -fPIC for clarity.
# 'C' sources are compile with -fPIC so they can produce .so library.
# NOTE: you may combine the .o's into a .a "mega-library", which can
# be converted to a mega- .so
#
# Begin by cancelling the default rule -- we REQUIRE a special suffix
%.o: %.c
%-ve.o: %-ncc.c
$(NCC) $(CFLAGS) -S $< -o $*-ve.s
$(NCC) $(CFLAGS) -fPIC -c $< -o $@
%-ve.o: %-clang.c
$(CLANG) $(CLANG_FLAGS) -c $< -o $*-clang.s
$(CLANG) $(CLANG_FLAGS) -fPIC -c $< -o $@
%-x86.o: %-x86.c
$(GCC) $(C86FLAGS) -c $< -o $*-x86.s
$(GCC) $(C86FLAGS) -fPIC -c $< -o $@
# OK $(CLANG) -target ve -O3 -mllvm -show-spill-message-vec -fno-vectorize -fno-unroll-loops -fno-slp-vectorize -fno-crash-diagnostics -fPIC -o $@ -c $<
# OK $(CLANG) -target ve -mllvm $(CLANG_VI_FLAGS) -fPIC -o $@ -c $<
# annotated assembly (without -fPIC, to simplify)
%-vi_bin.asm: %-vi.c
$(CLANG) $(filter-out -fPIC,$(CLANG_FLAGS)) -ggdb -S $< -o $*-vi_bin.s
$(NCC) $(CFLAGS) -o $*-vi_bin.o -c $*-vi_bin.s
nobjdump -DS -j .text $*-vi_bin.o >& $@
%-ve.o: %-vi.c
ifneq (${BIN_MK_VERBOSE},0)
which $(CLANG)
$(CLANG) --version
@#ls -l
endif
@#$(MAKE) $*-vi_bin.asm # Why does make not find this rule?
#$(CLANG) $(filter-out -fPIC,$(CLANG_FLAGS)) -ggdb -S $< -o $*-vi_bin.s
#$(NCC) $(CFLAGS) -o $*-vi_bin.o -c $*-vi_bin.s
#nobjdump -DS -j .text $*-vi_bin.o >& $*-vi_bin.asm
#rm -f $*-vi_bin.s $*-vi_bin.o
# the official compile "as is"
$(CLANG) $(CLANG_FLAGS) -fPIC -S $< -o $*-vi.s
$(NCC) $(CFLAGS) -o $@ -c $*-vi.s
# create a second object file, with unrolling and change func name
# Ex. export CLANG_UNROLL='-loop-unroll-count=2 -unroll-allow-partial -fsave-optimization-record'
%_unroll-ve.o: %-vi.c
$(CLANG) $(CLANG_FLAGS) -funroll-loops '-Rpass=loop.*' $(CLANG_UNROLL) -S $< -o $*_unroll-vi.s
@#$(NCC) $(CFLAGS) -o $@ -c $*_unroll-vi.s
$(NCC) $(CFLAGS) -fPIC -o $*_unroll-ve.o.tmp -c $*_unroll-vi.s
@#nobjcopy --redefine-sym $*=$*_unroll $*_unroll-ve.o.tmp $@
@# the file name does not always match the function name!
ifeq (1,0)
@# but --prefix-symbols might be too much: "unroll_GLOBAL_OFFSET_TABLE"
nobjcopy --prefix-symbols unroll_ $*_unroll-ve.o.tmp $@
else
# OK, expect the client to create a file of symbol renames...
if [ -f '[email protected]' ]; then \
echo ".rename file exists"; \
nobjcopy --redefine-syms '[email protected]' $*_unroll-ve.o.tmp $@; \
else \
echo "No .rename file, try shorcut rename $* (from file name)"; \
nobjcopy --redefine-sym $*=$*_unroll $*_unroll-ve.o.tmp $@; \
fi
endif
ifneq (${BIN_MK_VERBOSE},0)
@echo 'Here are the alternate .o file symbols in $@'
$(NM) $@
endif
rm -f $*_unroll-ve.o.tmp
# Begin by cancelling the default rule -- we REQUIRE a special suffix
%.o: %.cpp
%-ve.o: %-ncc.cpp
$(NCXX) $(CXXFLAGS) -fPIC -S $< -o $*-ncc_cpp.s
$(NCXX) $(CXXFLAGS) -fPIC -c $< -o $@
%-ve.o: %-clang.cpp
$(CXXLANG) $(CXXLANG_FLAGS) -S $< -o $*-clang_cpp.s
$(CXXLANG) $(CXXLANG_FLAGS) -fPIC -c $< -o $@
%-ve.o: %-vi.cpp
# this one might not be supported? 'vi' ~ VE intrinsics
$(CXXLANG) $(CXXLANG_FLAGS) -S $< -o $*-vi_cpp.s
$(CXXLANG) $(CXXLANG_FLAGS) -fPIC -c $< -o $@
# ERROR: missing symbol std::__1::cout (do we need to link with clang stdc++ somehow?)
# try nc++ for compile (can we use an eventual link with libnc++)
#$(NCXX) $(CXX_FLAGS) -fPIC -c $*-vi_cpp.s -o $@
%-x86.o: %-x86.cpp
# this one might not be supported?
$(GCXX) $(CXX86FLAGS) -S $< -o $*-x86_cpp.s
$(GCXX) $(CXX86FLAGS) -fPIC -c $< -o $@
%-ve: %-ve.o
$(NCXX) $(CXXFLAGS) $< -o $@
%-x86: %-x86.o
$(GCXX) $(CXX86FLAGS) $< -o $@
# Aurora assembler.S: cpp->.asm, ncc->.o, nobjcopy->.bin, .bin-->.dump
ifeq ($(VERBOSE),0)
%.bin: %.S
@# .S files can run through *just* the C preprocessor.
@$(NCC) -o $*.asm -E $< || { echo "trouble preprocessing $<"; false; }
@sed -i '/^[[:space:]]*$$/d' $*.asm || { echo "trouble removing blank lines"; false; }
@# .bin needs even more than -fPIC (no GOT, PLT, external symbols!)
@$(NCC) -o $*.o -c $< || { echo "trouble compiling $<"; false; }
@# we can get symbols + code + data disassembled
@nobjdump -D $*.o > $*.dis || { echo "trouble disassembling $*.o"; false; }
@# create a relocatable machine-language blob as follows
@nobjcopy -O binary $*.o $*.bin || { echo "trouble making $*.bin blob"; false; }
@# we can dump or disassemble the raw machine code
@hexdump -C $*.bin > $*.dump
@nobjdump -b binary -mve -D $*.bin >> $*.dump || { echo "trouble with objdump $*.bin"; false; }
else
%.bin: %.S
@# .S files can run through *just* the C preprocessor.
$(NCC) -o $*.asm -E $< && sed -i '/^[[:space:]]*$$/d' $*.asm
@# .bin needs even more than -fPIC (no GOT, PLT, external symbols!)
$(NCC) -o $*.o -c $<
@# we can get symbols + code + data disassembled
nobjdump -D $*.o > $*.dis
@# create a relocatable machine-language blob as follows
nobjcopy -O binary $*.o $*.bin
@# we can dump or disassemble the raw machine code
hexdump -C $*.bin > $*.dump
@echo "===========================" >> $*.dump
@echo "nobjdump -b binary -mve -D %*.bin" >> $*.dump
nobjdump -b binary -mve -D $*.bin >> $*.dump
endif
clean:
for f in *.bin; do b=`basename $$f .bin`; rm -f $$b.asm $$b.o $$b.dis $$b.dump; done
realclean: clean
rm -f *.bin
#