Skip to content

Commit

Permalink
osx: added support to compiles patches on mac osx
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiasseemoo committed Oct 27, 2016
1 parent 135c7d6 commit a4f58e2
Show file tree
Hide file tree
Showing 5,276 changed files with 51 additions and 19 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
18 changes: 16 additions & 2 deletions buildtools/flash_patch_extractor/Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,25 @@
fpext : fpext.o darm/armv7.o darm/armv7-tbl.o darm/darm.o darm/darm-tbl.o darm/thumb2.o darm/thumb2-decoder.o darm/thumb2-tbl.o darm/thumb.o darm/thumb-tbl.o
ifeq ($(HOSTUNAME),Darwin)
gcc-mp-5 -L/opt/local/lib -largp -o $@ $^
else
gcc -o $@ $^
endif

fpext.o : fpext.c
ifeq ($(HOSTUNAME),Darwin)
gcc-mp-5 -std=c99 -Wall -Wno-unused-result -O0 -D_BSD_SOURCE -o $@ -c $<
else
gcc -std=c99 -Wall -Wno-unused-result -O0 -D_BSD_SOURCE -o $@ -c $<
endif

darm/%.o: darm/%.c
ifeq ($(HOSTUNAME),Darwin)
gcc-mp-5 -std=c99 -Wall -O2 -Wextra -Wno-missing-field-initializers -o $@ -c $^
else
gcc -std=c99 -Wall -O2 -Wextra -Wno-missing-field-initializers -o $@ -c $^
endif

fp.6.37.32.RC23.34.43_r639704_hammerhead_mob30y.c: ../../bootimg_src/firmware/fw_bcmdhd.6.37.32.RC23.34.43_r639704_hammerhead_mob30y.bin
./fpext -r $< -b 0x1d2000 -e 0x1d2948 > $@
clean: FORCE
rm -f *.o darm/*.o fpext

FORCE:
1 change: 0 additions & 1 deletion buildtools/flash_patch_extractor/fpext.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#include <stdlib.h>
#include <argp.h>
#include <string.h>
#include <byteswap.h>
#include "darm/darm.h"

#include <arpa/inet.h>
Expand Down
Loading

0 comments on commit a4f58e2

Please sign in to comment.