Skip to content
This repository has been archived by the owner on May 9, 2018. It is now read-only.

Commit

Permalink
Makefile changes
Browse files Browse the repository at this point in the history
  • Loading branch information
DanTheMan827 committed Jan 7, 2018
1 parent addd439 commit 8823c21
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 18 deletions.
46 changes: 29 additions & 17 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,27 +1,39 @@
all: out/dropbear.hmod
out/dropbear.hmod: mod/bin/dropbear
[ -f "out/dropbear.hmod" ] || tar -czvf out/dropbear.hmod -C mod bin etc
GIT_COMMIT := $(shell echo "`git rev-parse --short HEAD``git diff-index --quiet HEAD -- || echo '-dirty'`")

mod/bin/dropbear: src/dropbear-2015.68/dropbear
mkdir -p mod/bin
[ -f mod/bin/dropbear ] || upx --ultra-brute src/dropbear-2015.68/dropbear -o mod/bin/dropbear
chmod +x mod/bin/dropbear
all: out/dropbear-$(GIT_COMMIT).hmod

src/dropbear-2015.68.tar.bz2:
mkdir -p src
wget https://github.com/DanTheMan827/dropbear.hmod/releases/download/tarballs/dropbear-2015.68.tar.bz2 -O src/dropbear-2015.68.tar.bz2
out/dropbear-$(GIT_COMMIT).hmod: mod/bin/dropbear
mkdir -p "out"
chmod +x mod/etc/init.d/*
tar -czvf "$@" -C "mod" "bin" "etc"
touch "$@"

src/dropbear-2015.68/configure: src/dropbear-2015.68.tar.bz2
[ -f src/dropbear-2015.68/configure ] || tar -xjvf src/dropbear-2015.68.tar.bz2 -C src/
mod/bin/dropbear: src/dropbear-2015.68/dropbear
mkdir -p "mod/bin"
upx --ultra-brute "$<" -o "$@"
chmod +x "$@"
touch "$@"

src/dropbear-2015.68/Makefile: src/dropbear-2015.68/configure
cd src/dropbear-2015.68; \
cd "src/dropbear-2015.68"; \
./configure --host=arm-linux-gnueabihf --prefix=/ --disable-zlib CC=arm-linux-gnueabihf-gcc LD=arm-linux-gnueabihf-ld
touch "$@"

src/dropbear-2015.68/dropbear: src/dropbear-2015.68/Makefile
make -C src/dropbear-2015.68
make -C "src/dropbear-2015.68"

src/dropbear-2015.68/configure: src/dropbear-2015.68.tar.bz2
tar -xjvf "$<" -C "src/"
touch "$@"

src/dropbear-2015.68.tar.bz2:
mkdir -p "src/"
wget https://github.com/DanTheMan827/dropbear.hmod/releases/download/tarballs/dropbear-2015.68.tar.bz2 -O "$@"

clean: clean-hmod
-rm -rf "src/"

clean:
-rm -rf "out/" "mod/bin/dropbear" "src/"
clean-hmod:
-rm -rf "out/" "mod/bin/dropbear"

.PHONY: all clean
.PHONY: all clean clean-hmod
2 changes: 1 addition & 1 deletion mod/etc/avahi/services/ssh.service
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
<type>_ssh._tcp</type>
<port>22</port>
</service>
</service-group>
</service-group>

0 comments on commit 8823c21

Please sign in to comment.