Allow to compile without RECOIL (make NORECOIL=1)

This commit is contained in:
Thomas Bernard 2018-03-02 22:27:15 +01:00
parent 701dec6df3
commit d9ca8c044b
3 changed files with 16 additions and 1 deletions

View File

@ -60,6 +60,9 @@ several layers at a time: You will still be able to edit layered images,
but you will only see one layer at a time. This option is designed for slow
platforms, as it makes the program faster.
Compile with NORECOIL=1 to disable support of the RECOIL (REtro COmputer Image
Library) for loading images. This is advised on memory constrained platforms.
=== Other compilation targets ===
make clean
Erases all generated files (intermediate objects, and executable)
@ -199,7 +202,8 @@ Before compilation you have to build all the needed libraries mentioned in requi
To compile a Atari TOS executable, type in
make ATARICROSS=1 prefix=/usr/m68k-atari-mint
You can also add other options like NOTTF,NOLUA,NOLAYERS etc. to enable/disable program features..
You can also add other options like NOTTF,NOLUA,NOLAYERS,NORECOIL etc. to enable/disable
program features.
If you don't know how build libraries here's some hints. Please note that prefix path in examples below is valid only under Linux,
in case of Cygwin the path will be '/opt/m68k-atari-mint'. There will be no prefix when building on native machine.

View File

@ -522,6 +522,11 @@ else
LUALABEL =
endif
#Recoil is optional
ifdef NORECOIL
COPT += -DNORECOIL
endif
#To enable Joystick emulation of cursor, make USE_JOYSTICK=1 (for input.o)
#This can be necessary to test cursor code on a PC, but by default for all
#non-console platforms the joystick is disabled, to avoid reporting
@ -547,7 +552,9 @@ OBJS = main.o init.o graph.o sdlscreen.o misc.o special.o \
fileformats.o miscfileformats.o libraw2crtc.o \
brush_ops.o buttons_effects.o layers.o \
oldies.o tiles.o colorred.o unicode.o
ifndef NORECOIL
OBJS += loadrecoil.o recoil.o
endif
OBJ = $(addprefix $(OBJDIR)/,$(OBJS))
SKINS = skin_classic.png skin_modern.png skin_DPaint.png \

View File

@ -176,7 +176,9 @@ void Load_SDL_Image(T_IO_Context *);
// -- Recoil ----------------------------------------------------------------
// 8bits and 16bits computer graphics
#ifndef NORECOIL
void Load_Recoil_Image(T_IO_Context *);
#endif
// ENUM Name TestFunc LoadFunc SaveFunc PalOnly Comment Layers Ext Exts
const T_Format File_formats[] = {
@ -666,8 +668,10 @@ void Load_image(T_IO_Context *context)
{
context->Format = DEFAULT_FILEFORMAT;
// try with recoil
#ifndef NORECOIL
Load_Recoil_Image(context);
if (File_error)
#endif
{
// Last try: with SDL_image
Load_SDL_Image(context);