New version 8.0.0_r4

This commit is contained in:
Andrey Bondrov 2018-12-01 14:23:20 +10:00
parent 76e04824a9
commit 9d1199956a
15 changed files with 8955 additions and 359 deletions

View file

@ -1,3 +1,5 @@
sources:
"core-4.4.2_r2.tar.bz2": 114e02871e8ca1c2145497b367e39584a57f257e
"extras-4.4.2_r2.tar.bz2": 20f7548170dde17f7aa6427d8f1010903f207c07
core-8.0.0_r4.tar.xz: cf5249cdc71a3b9706c55f6c040abd635b476dec
extras-8.0.0_r4.tar.xz: 535c1a88071172af9d58b4bf7175ee9ac3a4add5
boringssl-8.0.0_r4.tar.xz: 8e26b206b7ac535b4c13ab94c48b9656ab1f779f
mdnsresponder-8.0.0_r4.tar.xz: 1be6b99dd19707a5b376cfc2d38636f2a8c59f6b

36
0001-Add-string-h.patch Normal file
View file

@ -0,0 +1,36 @@
diff --git a/core/base/errors_unix.cpp b/core/base/errors_unix.cpp
index 296995e..48269b6 100644
--- a/core/base/errors_unix.cpp
+++ b/core/base/errors_unix.cpp
@@ -17,6 +17,7 @@
#include "android-base/errors.h"
#include <errno.h>
+#include <string.h>
namespace android {
namespace base {
diff --git a/core/base/file.cpp b/core/base/file.cpp
index 81b04d7..2fd2b6e 100644
--- a/core/base/file.cpp
+++ b/core/base/file.cpp
@@ -22,6 +22,7 @@
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
+#include <string.h>
#include <memory>
#include <mutex>
diff --git a/core/base/logging.cpp b/core/base/logging.cpp
index 6357b4b..3c7dbce 100644
--- a/core/base/logging.cpp
+++ b/core/base/logging.cpp
@@ -23,6 +23,7 @@
#include <fcntl.h>
#include <libgen.h>
#include <time.h>
+#include <string.h>
// For getprogname(3) or program_invocation_short_name.
#if defined(__ANDROID__) || defined(__APPLE__)

View file

@ -0,0 +1,15 @@
diff --git a/core/adb/client/usb_libusb.cpp b/core/adb/client/usb_libusb.cpp
index 7adb262..b994c8c 100644
--- a/core/adb/client/usb_libusb.cpp
+++ b/core/adb/client/usb_libusb.cpp
@@ -27,8 +27,9 @@
#include <string>
#include <thread>
#include <unordered_map>
+#include <condition_variable>
-#include <libusb/libusb.h>
+#include <libusb-1.0/libusb.h>
#include <android-base/file.h>
#include <android-base/logging.h>

17
0003-atomic-fix.patch Normal file
View file

@ -0,0 +1,17 @@
diff --git a/core/libcutils/include/cutils/trace.h b/core/libcutils/include/cutils/trace.h
index fcbdc9b..4281375 100644
--- a/core/libcutils/include/cutils/trace.h
+++ b/core/libcutils/include/cutils/trace.h
@@ -18,7 +18,12 @@
#define _LIBS_CUTILS_TRACE_H
#include <inttypes.h>
+#ifdef __cplusplus
+#include <atomic>
+using namespace std;
+#else
#include <stdatomic.h>
+#endif
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>

File diff suppressed because it is too large Load diff

View file

@ -1,73 +0,0 @@
# Makefile for adb
# modified and adapted for Mageia by daviddavid
PREFIX=/usr
BINDIR=$(PREFIX)/bin
SBINDIR=$(PREFIX)/sbin
LIBDIR=$(PREFIX)/lib
DATADIR=$(PREFIX)/share
LOCALEDIR=$(PREFIX)
SRCS+= adb.c
SRCS+= adb_client.c
SRCS+= adb_auth_host.c
SRCS+= commandline.c
SRCS+= console.c
SRCS+= file_sync_client.c
SRCS+= fdevent.c
SRCS+= get_my_path_linux.c
SRCS+= services.c
SRCS+= sockets.c
SRCS+= transport.c
SRCS+= transport_local.c
SRCS+= transport_usb.c
SRCS+= usb_linux.c
SRCS+= usb_vendors.c
VPATH+= ../libcutils
SRCS+= socket_inaddr_any_server.c
SRCS+= socket_local_client.c
SRCS+= socket_local_server.c
SRCS+= socket_loopback_client.c
SRCS+= socket_loopback_server.c
SRCS+= socket_network_client.c
SRCS+= load_file.c
SRCS+= list.c
VPATH+= ../libzipfile
SRCS+= centraldir.c
SRCS+= zipfile.c
VPATH+= ../libmincrypt
SRCS+= rsa.c
SRCS+= sha.c
SRCS+= sha256.c
CPPFLAGS+= -DADB_HOST=1
CPPFLAGS+= -DHAVE_FORKEXEC=1
CPPFLAGS+= -DHAVE_SYMLINKS
CPPFLAGS+= -DHAVE_TERMIO_H
CPPFLAGS+= -D_GNU_SOURCE
CPPFLAGS+= -D_XOPEN_SOURCE
CPPFLAGS+= -I.
CPPFLAGS+= -I../include
CFLAGS+= $(RPM_OPT_FLAGS)
LIBS= -lrt -lpthread -lz -lcrypto
CC= $(TOOLCHAIN)gcc
LD= $(TOOLCHAIN)gcc
OBJS= $(SRCS:.c=.o)
all: adb
adb: $(OBJS)
$(LD) -o $@ $(LDFLAGS) $(OBJS) $(LIBS)
install: adb
mkdir -p $(DESTDIR)$(BINDIR)
install -m 755 adb $(DESTDIR)$(BINDIR)
clean:
rm -rf $(OBJS) adb

View file

@ -8,6 +8,7 @@ Type=forking
ExecStart=/usr/bin/adb start-server
ExecStop=/usr/bin/adb kill-server
PrivateTmp=yes
Environment=HOME=/var/lib/adb
[Install]
WantedBy=multi-user.target

View file

@ -1,19 +1,14 @@
diff -Naur extras/ext4_utils/contents.c extras_new/ext4_utils/contents.c
--- extras/ext4_utils/contents.c 2013-08-01 00:23:25.000000000 +0200
+++ extras_new/ext4_utils/contents.c 2014-02-15 22:38:48.868107115 +0100
@@ -18,11 +18,11 @@
#include <string.h>
#include <stdio.h>
--- android-tools-8.0.0_r4/extras/ext4_utils/contents.c.bak 2017-06-11 09:17:45.000000000 +0200
+++ android-tools-8.0.0_r4/extras/ext4_utils/contents.c 2017-09-02 19:25:01.841722549 +0200
@@ -26,11 +26,7 @@
#include "extent.h"
#include "indirect.h"
-#ifdef HAVE_ANDROID_OS
+//#ifdef HAVE_ANDROID_OS
-#ifdef __ANDROID__
#include <linux/capability.h>
-#else
-#include <private/android_filesystem_capability.h>
-#endif
+//#else
+//#include <private/android_filesystem_capability.h>
+//#endif
#define XATTR_SELINUX_SUFFIX "selinux"
#define XATTR_CAPS_SUFFIX "capability"

View file

@ -1,24 +0,0 @@
diff -Naur extras/ext4_utils/make_ext4fs.c extras_new/ext4_utils/make_ext4fs.c
--- extras/ext4_utils/make_ext4fs.c 2013-08-01 00:23:25.000000000 +0200
+++ extras_new/ext4_utils/make_ext4fs.c 2014-02-15 21:34:03.790227581 +0100
@@ -61,7 +61,7 @@
#include <selinux/selinux.h>
#include <selinux/label.h>
-#include <selinux/android.h>
+//#include <selinux/android.h>
#define O_BINARY 0
diff -Naur extras/ext4_utils/make_ext4fs_main.c extras_new/ext4_utils/make_ext4fs_main.c
--- extras/ext4_utils/make_ext4fs_main.c 2013-08-01 00:23:25.000000000 +0200
+++ extras_new/ext4_utils/make_ext4fs_main.c 2014-02-15 21:34:11.649360025 +0100
@@ -32,7 +32,7 @@
#ifndef USE_MINGW
#include <selinux/selinux.h>
#include <selinux/label.h>
-#include <selinux/android.h>
+//#include <selinux/android.h>
#else
struct selabel_handle;
#endif

View file

@ -0,0 +1,20 @@
--- android-tools-8.0.0_r4/core-8.0.0_r4/libcutils/ashmem-dev.c.sysmacros 2017-06-28 00:39:52.000000000 +0200
+++ android-tools-8.0.0_r4/core-8.0.0_r4/libcutils/ashmem-dev.c 2018-09-21 19:00:49.333087360 +0200
@@ -29,6 +29,7 @@
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <sys/types.h>
+#include <sys/sysmacros.h>
#include <unistd.h>
#include <cutils/ashmem.h>
--- android-tools-8.0.0_r4/core-8.0.0_r4/adb/client/usb_linux.cpp.sysmacros 2017-06-28 00:39:52.000000000 +0200
+++ android-tools-8.0.0_r4/core-8.0.0_r4/adb/client/usb_linux.cpp 2018-09-21 19:02:28.508080866 +0200
@@ -31,6 +31,7 @@
#include <sys/ioctl.h>
#include <sys/time.h>
#include <sys/types.h>
+#include <sys/sysmacros.h>
#include <unistd.h>
#include <chrono>

View file

@ -1,7 +1,7 @@
Summary: Android platform tools (adb, fastboot, mkbootimg)
Name: android-tools
Version: 4.4.2_r2
Release: 3
Version: 8.0.0_r4
Release: 1
# The entire source code is Apache Software License except fastboot/ which is BSD
License: Apache Software License and BSD
Group: Development/Tools
@ -12,17 +12,22 @@ Url: http://developer.android.com/tools/
#
# git clone https://android.googlesource.com/platform/system/extras.git && cd extras
# git archive android-%%{version} --prefix=extras/ ext4_utils | bzip2 > ../extras-%%{version}.tar.bz2
Source0: core-%{version}.tar.bz2
Source1: extras-%{version}.tar.bz2
Source2: core-Makefile
Source3: adb-Makefile
Source4: fastboot-Makefile
Source5: mkbootimg-Makefile
Source6: 51-android.rules
Source7: adb.service
Patch0: android-tools-4.4.2-ignore-selinux-android.h.patch
Patch1: android-tools-4.4.2-ignore-android_filesystem_capability.h.patch
BuildRequires: selinux-devel
Source0: core-%{version}.tar.xz
Source1: extras-%{version}.tar.xz
Source2: generate_build.rb
Source3: boringssl-%{version}.tar.xz
Source4: mdnsresponder-%{version}.tar.xz
Source5: 51-android.rules
Source6: adb.service
Patch1: 0001-Add-string-h.patch
Patch2: 0002-libusb-modifications.patch
Patch3: 0003-atomic-fix.patch
Patch5: android-tools-4.4.2-ignore-android_filesystem_capability.h.patch
Patch6: android-tools-8.0.0_r4-sysmacros.patch
BuildRequires: ruby
BuildRequires: gtest-devel
BuildRequires: pkgconfig(libselinux)
BuildRequires: pkgconfig(libusb-1.0)
BuildRequires: pkgconfig(openssl)
BuildRequires: pkgconfig(zlib)
Requires(post,preun): rpm-helper
@ -56,11 +61,14 @@ For ROSA you must use the following commands :
- mkbootimg
%files
%doc adb/OVERVIEW.TXT adb/SERVICES.TXT adb/NOTICE adb/protocol.txt
%doc core/adb/OVERVIEW.TXT core/adb/SERVICES.TXT core/adb/NOTICE core/adb/protocol.txt
%{_udevrulesdir}/51-android.rules
%{_unitdir}/adb.service
%attr(0755,root,root) %dir %{_sharedstatedir}/adb
#Apache Software License
%{_bindir}/adb
%{_bindir}/simg2img
%{_bindir}/img2simg
%{_bindir}/mkbootimg
#Apache Software License and BSD.
%{_bindir}/fastboot-android
@ -74,25 +82,28 @@ For ROSA you must use the following commands :
#----------------------------------------------------------------------------
%prep
%setup -q -b 1 -n extras
%setup -q -a 1 -a 3 -a 4 -c %{name}-%{version}
ln -s core-%{version} core
ln -s extras-%{version} extras
ln -s boringssl-%{version} boringssl
ln -s mdnsresponder-%{version} mdnsresponder
%apply_patches
%setup -q -b 0 -n core-%{version}
cp -pr %{SOURCE2} Makefile
cp -pr %{SOURCE3} adb/Makefile
cp -pr %{SOURCE4} fastboot/Makefile
cp -pr %{SOURCE5} mkbootimg/Makefile
%build
%make
pushd core
ruby %{SOURCE2} | tee build.sh
PKGVER=android-%{version} CXXFLAGS="%{optflags}" CFLAGS="%{optflags}" sh -xe build.sh
popd
%install
%makeinstall_std
install -d -m 0755 %{buildroot}%{_bindir}
install -d -m 0775 %{buildroot}%{_sharedstatedir}/adb
install -m 0755 -t %{buildroot}%{_bindir} core/adb/adb core/fastboot/fastboot core/libsparse/simg2img core/libsparse/img2simg core/mkbootimg/mkbootimg
mv %{buildroot}%{_bindir}/fastboot %{buildroot}%{_bindir}/fastboot-android
# for 51-android.rules
mkdir -p %{buildroot}%{_udevrulesdir}
install -m 0644 %{SOURCE6} %{buildroot}%{_udevrulesdir}/51-android.rules
install -m 0644 %{SOURCE5} %{buildroot}%{_udevrulesdir}/51-android.rules
# for adb.service
mkdir -p %{buildroot}%{_unitdir}
install -m 0644 %{SOURCE7} %{buildroot}%{_unitdir}/adb.service
install -m 0644 %{SOURCE6} %{buildroot}%{_unitdir}/adb.service

View file

@ -1,17 +0,0 @@
# Makefile for core
# modified and adapted for Mageia by daviddavid
all:
$(MAKE) -C adb all
$(MAKE) -C fastboot all
$(MAKE) -C mkbootimg all
install:
$(MAKE) -C adb install
$(MAKE) -C fastboot install
$(MAKE) -C mkbootimg install
clean:
$(MAKE) -C adb clean
$(MAKE) -C fastboot clean
$(MAKE) -C mkbootimg clean

View file

@ -1,74 +0,0 @@
# Makefile for fastboot (fastboot-android for Mageia)
# modified and adapted for Mageia by daviddavid
PREFIX=/usr
BINDIR=$(PREFIX)/bin
SBINDIR=$(PREFIX)/sbin
LIBDIR=$(PREFIX)/lib
DATADIR=$(PREFIX)/share
LOCALEDIR=$(PREFIX)
SRCS+= bootimg.c
SRCS+= engine.c
SRCS+= fastboot.c
SRCS+= protocol.c
SRCS+= usb_linux.c
SRCS+= util_linux.c
VPATH+= ../libzipfile
SRCS+= centraldir.c
SRCS+= zipfile.c
VPATH+= ../libsparse
SRCS+= backed_block.c
SRCS+= output_file.c
SRCS+= sparse.c
SRCS+= sparse_crc32.c
SRCS+= sparse_err.c
SRCS+= sparse_read.c
VPATH+= ../../extras/ext4_utils
SRCS+= allocate.c
SRCS+= contents.c
SRCS+= crc16.c
SRCS+= ext4_utils.c
SRCS+= extent.c
SRCS+= indirect.c
SRCS+= make_ext4fs.c
SRCS+= sha1.c
SRCS+= uuid.c
SRCS+= wipe.c
CPPFLAGS+= -DADB_HOST=1
CPPFLAGS+= -DHAVE_FORKEXEC=1
CPPFLAGS+= -DHAVE_SYMLINKS
CPPFLAGS+= -DHAVE_TERMIO_H
CPPFLAGS+= -D_GNU_SOURCE
CPPFLAGS+= -D_XOPEN_SOURCE
CPPFLAGS+= -I.
CPPFLAGS+= -I../include
CPPFLAGS+= -I../libsparse/include
CPPFLAGS+= -I../mkbootimg
CPPFLAGS+= -I../../extras/ext4_utils
#CFLAGS+= $(RPM_OPT_FLAGS)
#LIBS= -lrt -lpthread -lz -lselinux
LIBS+= -lz -lselinux
#CC= $(TOOLCHAIN)gcc
#LD= $(TOOLCHAIN)gcc
OBJS= $(SRCS:.c=.o)
all: fastboot
fastboot: $(OBJS)
#$(LD) -o $@ $(LDFLAGS) $(OBJS) $(LIBS)
$(CC) -o $@ $(LDFLAGS) $(OBJS) $(LIBS)
install: fastboot
mkdir -p $(DESTDIR)$(BINDIR)
install -m 755 fastboot $(DESTDIR)$(BINDIR)/fastboot-android
clean:
rm -rf $(OBJS) fastboot

209
generate_build.rb Normal file
View file

@ -0,0 +1,209 @@
#!/usr/bin/ruby
# Android build system is complicated and does not allow to build
# separate parts easily.
# This script tries to mimic Android build rules.
def expand(dir, files)
files.map{|f| File.join(dir,f)}
end
# Compiles sources to *.o files.
# Returns array of output *.o filenames
def compile(sources, cflags)
outputs = []
for s in sources
ext = File.extname(s)
case ext
when '.c'
cc = 'gcc'
lang_flags = '-std=gnu11 $CFLAGS $CPPFLAGS'
when '.cpp', '.cc'
cc = 'g++'
lang_flags = '-std=gnu++14 $CXXFLAGS $CPPFLAGS'
else
raise "Unknown extension #{ext}"
end
output = s + '.o'
outputs << output
puts "#{cc} -o #{output} #{lang_flags} #{cflags} -c #{s}\n"
end
return outputs
end
# Links object files
def link(output, objects, ldflags)
puts "g++ -o #{output} #{ldflags} $LDFLAGS #{objects.join(' ')}"
end
adbdfiles = %w(
client/usb_dispatch.cpp
client/usb_libusb.cpp
client/usb_linux.cpp
adb.cpp
adb_io.cpp
socket_spec.cpp
adb_listeners.cpp
adb_utils.cpp
sockets.cpp
transport.cpp
transport_local.cpp
transport_usb.cpp
services.cpp
adb_trace.cpp
diagnose_usb.cpp
adb_auth_host.cpp
sysdeps_unix.cpp
)
libadbd = compile(expand('adb', adbdfiles), '-DADB_REVISION=\"$PKGVER\" -DADB_HOST=1 -fpermissive -I../boringssl/include -Iadb -Iinclude -Ibase/include -Ilibcrypto_utils/include')
adbshfiles = %w(
fdevent.cpp
shell_service.cpp
shell_service_protocol.cpp
)
libadbsh = compile(expand('adb', adbshfiles), '-DADB_REVISION=\"$PKGVER\" -DADB_HOST=0 -D_Nonnull= -D_Nullable= -fpermissive -Iadb -Iinclude -Ibase/include')
adbfiles = %w(
console.cpp
bugreport.cpp
commandline.cpp
adb_client.cpp
sysdeps/errno.cpp
file_sync_client.cpp
line_printer.cpp
transport_mdns.cpp
client/main.cpp
)
libadb = compile(expand('adb', adbfiles), '-DADB_REVISION=\"$PKGVER\" -D_GNU_SOURCE -DADB_HOST=1 -D_Nonnull= -D_Nullable= -fpermissive -Iadb -I../mdnsresponder/mDNSShared -Iinclude -Ibase/include')
basefiles = %w(
file.cpp
logging.cpp
parsenetaddress.cpp
stringprintf.cpp
strings.cpp
errors_unix.cpp
)
libbase = compile(expand('base', basefiles), '-DADB_HOST=1 -D_GNU_SOURCE -Ibase/include -Iinclude')
logfiles = %w(
logger_write.c
local_logger.c
config_read.c
logprint.c
stderr_write.c
config_write.c
logger_lock.c
logger_name.c
log_event_list.c
log_event_write.c
fake_log_device.c
fake_writer.c
)
liblog = compile(expand('liblog', logfiles), '-DLIBLOG_LOG_TAG=1005 -DFAKE_LOG_DEVICE=1 -D_GNU_SOURCE -Ilog/include -Iinclude')
cutilsfiles = %w(
load_file.c
socket_inaddr_any_server_unix.c
socket_local_client_unix.c
socket_local_server_unix.c
socket_loopback_server_unix.c
socket_network_client_unix.c
threads.c
sockets.cpp
android_get_control_file.cpp
sockets_unix.cpp
)
libcutils = compile(expand('libcutils', cutilsfiles), '-D_GNU_SOURCE -Iinclude')
cryptofiles = %w(
android_pubkey.c
)
libcryptoutils = compile(expand('libcrypto_utils', cryptofiles), '-Ilibcrypto_utils/include -I../boringssl/include -Iinclude')
boringcryptofiles = %w(
bn/cmp.c
bn/bn.c
bytestring/cbb.c
mem.c
buf/buf.c
bio/file.c
bn/convert.c
base64/base64.c
)
boringcrypto = compile(expand('../boringssl/src/crypto', boringcryptofiles), '-I../boringssl/include -Iinclude')
mdnsfiles = %w(
mDNSShared/dnssd_ipc.c
mDNSShared/dnssd_clientstub.c
)
mdns = compile(expand('../mdnsresponder', mdnsfiles), '-D_GNU_SOURCE -DHAVE_IPV6 -DHAVE_LINUX -DNOT_HAVE_SA_LEN -DUSES_NETLINK -UMDNS_DEBUGMSGS -DMDNS_DEBUGMSGS=0 -I../mdnsresponder/mDNSShared -I../mdnsresponder/mDNSCore -Iinclude')
link('adb/adb', libbase + liblog + libcutils + boringcrypto + libcryptoutils + libadbd + libadbsh + mdns + libadb, '-lrt -ldl -lpthread -lcrypto -lutil -lusb-1.0')
fastbootfiles = %w(
socket.cpp
tcp.cpp
udp.cpp
protocol.cpp
engine.cpp
bootimg_utils.cpp
fastboot.cpp
util.cpp
fs.cpp
usb_linux.cpp
)
libfastboot = compile(expand('fastboot', fastbootfiles), '-DFASTBOOT_REVISION=\"$PKGVER\" -D_GNU_SOURCE -Iadb -Iinclude -Imkbootimg -Ibase/include -Ilibsparse/include -I../extras/ext4_utils/include -I../extras/f2fs_utils')
sparsefiles = %w(
backed_block.c
output_file.c
sparse.c
sparse_crc32.c
sparse_err.c
sparse_read.c
)
libsparse = compile(expand('libsparse', sparsefiles), '-Ilibsparse/include')
zipfiles = %w(
zip_archive.cc
)
libzip = compile(expand('libziparchive', zipfiles), '-Ibase/include -Iinclude')
utilfiles = %w(
FileMap.cpp
)
libutil = compile(expand('libutils', utilfiles), '-Iinclude')
ext4files = %w(
make_ext4fs.c
ext4fixup.c
ext4_utils.c
allocate.c
contents.c
extent.c
indirect.c
sha1.c
wipe.c
crc16.c
ext4_sb.c
)
libext4 = compile(expand('../extras/ext4_utils', ext4files), '-Ilibsparse/include -Iinclude -I../extras/ext4_utils/include')
link('fastboot/fastboot', libsparse + libzip + liblog + libutil + libcutils + boringcrypto + libcryptoutils + libbase + libext4 + libfastboot + libadbsh + libadbd, '-lpthread -lselinux -lz -lcrypto -lutil -lusb-1.0')
simg2imgfiles = %w(
simg2img.c
)
libsimg2img = compile(expand('libsparse', simg2imgfiles), '-Iinclude -Ilibsparse/include')
link('libsparse/simg2img', libsparse + libsimg2img, '-lz')
img2simgfiles = %w(
img2simg.c
)
libimg2simg = compile(expand('libsparse', img2simgfiles), '-Iinclude -Ilibsparse/include')
link('libsparse/img2simg', libsparse + libimg2simg, '-lz')

View file

@ -1,40 +0,0 @@
# Makefile for mkbootimg
# modified and adapted for Mageia by daviddavid
PREFIX=/usr
BINDIR=$(PREFIX)/bin
SBINDIR=$(PREFIX)/sbin
LIBDIR=$(PREFIX)/lib
DATADIR=$(PREFIX)/share
LOCALEDIR=$(PREFIX)
SRCS+= mkbootimg.c
VPATH+= ../libmincrypt
#SRCS+= dsa_sig.c
#SRCS+= p256.c
#SRCS+= p256_ec.c
#SRCS+= p256_ecdsa.c
SRCS+= rsa.c
SRCS+= sha.c
SRCS+= sha256.c
CPPFLAGS+= -I.
CPPFLAGS+= -I../include
#LIBS+=
OBJS=$(SRCS:.c=.o)
all: mkbootimg
mkbootimg: $(OBJS)
$(CC) -o $@ $(LDFLAGS) $(OBJS) $(LIBS)
install: mkbootimg
mkdir -p $(DESTDIR)$(BINDIR)
install -m 755 mkbootimg $(DESTDIR)$(BINDIR)
clean:
rm -rf $(OBJS) mkbootimg