mmozeiko / pkg2zip

Decrypts PlayStation Vita pkg file and packages to zip archive
The Unlicense
406 stars 89 forks source link

Doesn't compile on ARM #23

Closed copyread closed 5 years ago

copyread commented 5 years ago

Some compiling errors when compiling on Raspberry Pi 3 B+. Works perfectly fine on my PC.

$ make
[C] pkg2zip_aes.c
[C] pkg2zip.c
[C] pkg2zip_crc32.c
[C] pkg2zip_aes_x86.c
cc: error: unrecognized command line option ‘-maes’; did you mean ‘-mapcs’?
cc: error: unrecognized command line option ‘-mssse3’
makefile:28: recipe for target 'pkg2zip_aes_x86.o' failed
make: *** [pkg2zip_aes_x86.o] Error 1
mmozeiko commented 5 years ago

ARM is not really supported. Only x86 platforms. You could try following makefile, it might work:

BIN=pkg2zip
SRC=pkg2zip.c pkg2zip_aes.c pkg2zip_crc32.c pkg2zip_out.c pkg2zip_psp.c pkg2zip_sys.c pkg2zip_zip.c pkg2zip_zrif.c miniz_tdef.c puff.c
OBJ=${SRC:.c=.o}
DEP=${SRC:.c=.d}

CFLAGS=-std=c99 -pipe -fvisibility=hidden -Wall -Wextra -Werror -DNDEBUG -D_GNU_SOURCE -O2
LDFLAGS=-s

.PHONY: all clean

all: ${BIN}

clean:
    @${RM} ${BIN} ${OBJ} ${DEP}

${BIN}: ${OBJ}
    @echo [L] $@
    @${CC} ${LDFLAGS} -o $@ $^

%.o: %.c
    @echo [C] $<
    @${CC} ${CFLAGS} -MMD -c -o $@ $<

-include ${DEP}
copyread commented 5 years ago

Thank you, works perfectly!