Add submodules, better make

This commit is contained in:
blackle 2019-04-02 00:17:23 -04:00
parent af16eb5f0b
commit 187d331cf2
4 changed files with 24 additions and 2 deletions

6
.gitmodules vendored Normal file
View File

@ -0,0 +1,6 @@
[submodule "vondehi"]
path = vondehi
url = https://gitlab.com/PoroCYon/vondehi.git
[submodule "Section-Header-Stripper"]
path = Section-Header-Stripper
url = https://github.com/blackle/Section-Header-Stripper

View File

@ -1,15 +1,23 @@
all : gtk-webkit_opt.elf.xz
all : gtk-webkit
.PHONY: clean
packer : vondehi/vondehi.asm
cd vondehi; nasm -fbin -o vondehi vondehi.asm
gtk-webkit.elf : gtk-webkit.c Makefile
gcc -o $@ $< `pkg-config --cflags webkit2gtk-4.0` -lgobject-2.0 -lgtk-3 -lwebkit2gtk-4.0 -no-pie -fno-plt -Os -std=gnu11 -nostartfiles -nostdlib
gtk-webkit : gtk-webkit_opt.elf.packed
cp $< $@
%_opt.elf : %.elf Makefile
cp $< $@
strip $@
strip -R .note -R .comment -R .eh_frame -R .eh_frame_hdr -R .note.gnu.build-id -R .got -R .got.plt -R .gnu.version -R .rela.dyn -R .shstrtab $@
#remove section header
/home/blackle/Code/Projects/section-stripper/section-stripper.py $@
./section-stripper/section-stripper.py $@
#clear out useless bits
sed -i 's/_edata/\x00\x00\x00\x00\x00\x00/g' $@;
@ -24,4 +32,10 @@ gtk-webkit.elf : gtk-webkit.c Makefile
lzma --format=lzma -9 --extreme --lzma1=preset=9,lc=1,lp=0,pb=1,nice=270,depth=64,dict=16384 --keep --stdout $< > $@
wc -c $@
%.packed : %.xz packer Makefile
cat ./vondehi/vondehi $< > $@
chmod +x $@
wc -c $@
clean :
rm *.xz *.elf *.packed gtk-webkit

@ -0,0 +1 @@
Subproject commit a4c7aea4f06d2258009e10b322cacafa1d25662d

1
vondehi Submodule

@ -0,0 +1 @@
Subproject commit 859c6c11d08634bf51087337ff6fbf4bef69e0dd