Better makefile

This commit is contained in:
blackle 2019-04-02 00:24:36 -04:00
parent 187d331cf2
commit 57135dcee2
1 changed files with 3 additions and 3 deletions

View File

@ -10,14 +10,14 @@ 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 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 gtk-webkit : gtk-webkit_opt.elf.packed
cp $< $@ mv $< $@
%_opt.elf : %.elf Makefile %_opt.elf : %.elf Makefile
cp $< $@ cp $< $@
strip $@ 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 $@ 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 #remove section header
./section-stripper/section-stripper.py $@ ./Section-Header-Stripper/section-stripper.py $@
#clear out useless bits #clear out useless bits
sed -i 's/_edata/\x00\x00\x00\x00\x00\x00/g' $@; sed -i 's/_edata/\x00\x00\x00\x00\x00\x00/g' $@;
@ -38,4 +38,4 @@ gtk-webkit : gtk-webkit_opt.elf.packed
wc -c $@ wc -c $@
clean : clean :
rm *.xz *.elf *.packed gtk-webkit -rm *.elf gtk-webkit