-
Couldn't load subscription status.
- Fork 11
remove bundled git sources #104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
ebbf9ca
e2c1dde
44a4d3f
771e12a
3c99542
32ca3d5
2a7c424
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,2 @@ | ||
| lib/giflib/ | ||
| lib/libintraFont/ | ||
| lib/libpspmath/ |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -78,14 +78,6 @@ INTRAFONTOBJS := \ | |
| $(LIB_DIR)/libintraFont/src/intraFont.o \ | ||
| $(LIB_DIR)/libintraFont/src/libccc.o | ||
|
|
||
| GIFLIBOBJS := \ | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We removed GIFLIBOBJS and vendored includes, good cleanup. But -DOSL_IMAGE_LOADER_GIF is still defined while no -lgif is linked. This may cause linker errors or silently disable GIF. Suggest detecting giflib availability (via pkg-config or manual flag) and only enabling the macro + linking -lgif when it’s actually found. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, implementing IMG.cmake function for autotools or using an external image format library package like recoil, sail, or libvips should do the job. |
||
| $(LIB_DIR)/giflib/gif2rgb.o \ | ||
| $(LIB_DIR)/giflib/dgif_lib.o \ | ||
| $(LIB_DIR)/giflib/egif_lib.o \ | ||
| $(LIB_DIR)/giflib/gif_err.o \ | ||
| $(LIB_DIR)/giflib/gifalloc.o \ | ||
| $(LIB_DIR)/giflib/quantize.o | ||
|
|
||
| LIBOBJS := \ | ||
| $(SFONTOBJS) \ | ||
| $(PSPMATHOBJS) \ | ||
|
|
@@ -131,12 +123,12 @@ LIBOBJS := \ | |
| $(SOURCE_DIR)/image/format/oslLoadImageFilePNG.o \ | ||
| $(SOURCE_DIR)/image/format/oslWriteImageFilePNG.o \ | ||
| $(SOURCE_DIR)/image/format/oslLoadImageFileJPEG.o \ | ||
| $(SOURCE_DIR)/image/format/oslLoadImageFileGIF.o \ | ||
| $(SOURCE_DIR)/image/oslLoadImageFile.o \ | ||
| $(SOURCE_DIR)/image/oslWriteImageFile.o \ | ||
| $(SOURCE_DIR)/splash/oslShowSplashScreen1.o \ | ||
| $(SOURCE_DIR)/splash/oslShowSplashScreen2.o \ | ||
| $(SOURCE_DIR)/mem/oslGetRamStatus.o | ||
| # $(SOURCE_DIR)/image/format/oslLoadImageFileGIF.o | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is $(SOURCE_DIR)/image/format/oslLoadImageFileGIF.o commented out? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Probably an intermediate state that should be fix by implementing IMG.cmake for autotools Makefile or an external image format library. |
||
|
|
||
| OBJS := $(LIBOBJS) $(INTRAFONTOBJS) $(GIFLIBOBJS) | ||
|
|
||
|
|
@@ -147,7 +139,6 @@ OBJS := $(LIBOBJS) $(INTRAFONTOBJS) $(GIFLIBOBJS) | |
| INCDIR := $(INCDIR) \ | ||
| $(SOURCE_DIR) \ | ||
| $(LIB_DIR)/libintraFont/include \ | ||
| $(LIB_DIR)/giflib \ | ||
| $(LIB_DIR)/libpspmath/include | ||
|
|
||
| #---------------------------------------------------------------------------- | ||
|
|
@@ -182,8 +173,8 @@ DEFINES := \ | |
| -DPSP \ | ||
| -DOSL_IMAGE_LOADER_PNG \ | ||
| -DOSL_IMAGE_LOADER_JPEG \ | ||
| -DOSL_IMAGE_LOADER_GIF \ | ||
| -DOSL_IMAGE_WRITER_PNG | ||
| # -DOSL_IMAGE_LOADER_GIF | ||
|
|
||
| #---------------------------------------------------------------------------- | ||
| # Compiler settings | ||
|
|
@@ -289,10 +280,6 @@ ghpages: gendoc | |
| $(PSPMATHOBJS): %.o: %.c | ||
| $(CC) $(CFLAGS_THIRD_PARTY) $(addprefix -I,$(INCDIR)) -c $< -o $@ | ||
|
|
||
| # giflib objects | ||
| $(GIFLIBOBJS): %.o: %.c | ||
| $(CC) $(CFLAGS_THIRD_PARTY) $(addprefix -I,$(INCDIR)) -c $< -o $@ | ||
|
|
||
| # libintraFont objects | ||
| $(INTRAFONTOBJS): %.o: %.c | ||
| $(CC) $(CFLAGS_THIRD_PARTY) $(addprefix -I,$(INCDIR)) -c $< -o $@ | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -44,11 +44,15 @@ foreach(IMAGE_FORMAT ${OSL_IMAGE_FORMATS_AVAILABLE}) | |
| list(APPEND OSL_IMAGE_FORMATS_SUPPORTED ${IMAGE_FORMAT}) | ||
| if(${IMAGE_FORMAT} IN_LIST OSL_IMAGE_FORMAT_LOADERS) | ||
| add_compile_definitions(-DOSL_IMAGE_LOADER_${IMAGE_FORMAT}) | ||
| include_directories(${${IMAGE_FORMAT}_INCLUDE_DIRS}) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nice move dynamically wiring loaders/writers per format. But GIF is missing in the wiring — I see PNG/JPEG handled, but no conditional block for giflib (e.g. ${GIF_INCLUDE_DIRS}, ${GIF_LIBRARIES}). If OSL_IMAGE_FORMAT_LOADERS contains GIF, we should add both add_compile_definitions(...) and target_link_libraries(... GIF::GIF or ${GIF_LIBRARIES}). Otherwise we risk unintentional loss of GIF support. |
||
| include_directories(PUBLIC ${${IMAGE_FORMAT}_INCLUDE_DIRS}) | ||
| link_directories(PUBLIC ${${IMAGE_FORMAT}_LIBRARY_DIRS}) | ||
| link_libraries(PUBLIC ${${IMAGE_FORMAT}_LIBRARIES}) | ||
| endif() | ||
| if(${IMAGE_FORMAT} IN_LIST OSL_IMAGE_FORMAT_WRITERS) | ||
| add_compile_definitions(-DOSL_IMAGE_WRITER_${IMAGE_FORMAT}) | ||
| include_directories(${${IMAGE_FORMAT}_INCLUDE_DIRS}) | ||
| include_directories(PUBLIC ${${IMAGE_FORMAT}_INCLUDE_DIRS}) | ||
| link_directories(PUBLIC ${${IMAGE_FORMAT}_LIBRARY_DIRS}) | ||
| link_libraries(PUBLIC ${${IMAGE_FORMAT}_LIBRARIES}) | ||
| endif() | ||
| else() | ||
| list(REMOVE_ITEM OSL_IMAGE_FORMAT_WRITERS ${IMAGE_FORMAT}) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,15 +5,21 @@ OBJS = main.o | |
| BUILD_PRX = 1 | ||
| PSP_FW_VERSION=371 | ||
|
|
||
| CFLAGS = -O2 -g -G0 -Wall | ||
| DEFINES := \ | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. All samples now explicitly link PNG/JPEG (-lpng -ljpeg -lz) 👍. adding GIF defines + -lgif to the relevant samples, or providing at least one dedicated GIF example to prove the loader is still supported. |
||
| -DPSP \ | ||
| -DOSL_IMAGE_LOADER_PNG \ | ||
| -DOSL_IMAGE_LOADER_JPEG \ | ||
| -DOSL_IMAGE_WRITER_PNG | ||
|
|
||
| CFLAGS = -O2 -g -G0 -Wall ${DEFINES} | ||
| CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti | ||
| ASFLAGS = $(CFLAGS) | ||
| LIBDIR = | ||
|
|
||
| MYLIBS= | ||
| STDLIBS= -losl -lpng -lz \ | ||
| STDLIBS= -lm -losl -lpng -ljpeg -lz \ | ||
| -lpsphprm -lpspsdk -lpspctrl -lpspumd -lpsprtc -lpsppower -lpspgu -lpspgum -lpspaudiolib -lpspaudio -lpsphttp -lpspssl -lpspwlan \ | ||
| -lpspnet_adhocmatching -lpspnet_adhoc -lpspnet_adhocctl -lm -ljpeg | ||
| -lpspnet_adhocmatching -lpspnet_adhoc -lpspnet_adhocctl | ||
| LIBS=$(STDLIBS) $(MYLIBS) | ||
|
|
||
| LDFLAGS = | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call removing the vendored giflib. Just one concern, if we switch to external giflib, we must ensure CMake fails explicitly when giflib is not found, rather than silently disabling GIF support. Suggest find_package(GIF REQUIRED) when GIF is part of OSL_IMAGE_FORMAT_LOADERS.