Skip to content

Commit

Permalink
Added FFI.
Browse files Browse the repository at this point in the history
  • Loading branch information
gabordemooij committed May 4, 2024
1 parent 182591e commit 02dba47
Show file tree
Hide file tree
Showing 3 changed files with 658 additions and 16 deletions.
2 changes: 1 addition & 1 deletion plugins/media/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ libctrmedia.so: media.o
ld ${LDFLAGS} -lcurl -lSDL2 -lSDL2_image -lSDL2_ttf -lSDL2_mixer -o libctrmedia.so media.o

media.o:
cc -I . -c media.c -I /usr/include/SDL -I ../../i18n/${ISO} -I i18n/${ISO} -Wall -Werror -fPIC -o media.o
cc -D LIBCURL -D FFI -I . -c media.c -I /usr/include/SDL -I ../../i18n/${ISO} -I i18n/${ISO} -Wall -Werror -fPIC -o media.o

clean:
rm -rf libctrmedia.so
Expand Down
4 changes: 2 additions & 2 deletions plugins/media/makefile.win64
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ install-libctrmedia.dll: libctrmedia.dll
install libctrmedia.dll ../../mods/media/

libctrmedia.dll: media.o
$(CC) ${LDFLAGS} media.o -lcurl -lSDL2 -lSDL2_image -lSDL2_mixer -lSDL2_ttf ../../ctr${ISO}import.lib -o libctrmedia.dll
$(CC) ${LDFLAGS} media.o -lffi -lcurl -lSDL2 -lSDL2_image -lSDL2_mixer -lSDL2_ttf ../../ctr${ISO}import.lib -o libctrmedia.dll

media.o:
$(CC) ${CFLAGS} -I /usr/x86_64-w64-mingw32/include -I /usr/include/SDL2 -I ../../i18n/${ISO} -I i18n/${ISO} -c media.c -Wall -Werror -fPIC -o media.o
$(CC) ${CFLAGS} -D LIBCURL -D FFI -I /usr/x86_64-w64-mingw32/include -I /usr/include/SDL2 -I ../../i18n/${ISO} -I i18n/${ISO} -c media.c -Wall -Werror -fPIC -o media.o

clean:
rm media.o
Loading

0 comments on commit 02dba47

Please sign in to comment.