2009-01-24 00:41:01 +00:00
|
|
|
# Copyright (C) 2001-2009 by David Capello -*-Makefile-*-
|
2007-09-18 23:57:02 +00:00
|
|
|
|
|
|
|
.PHONY = _default
|
|
|
|
_default: default
|
|
|
|
|
|
|
|
######################################################################
|
|
|
|
# Setup CFLAGS and LFLAGS for GCC
|
|
|
|
|
2009-11-19 00:34:07 +00:00
|
|
|
CFLAGS += -Wall -I. -Isrc -Ithird_party \
|
|
|
|
-I$(LIBFREETYPE_DIR)/include \
|
|
|
|
-I$(LIBJPEG_DIR) \
|
|
|
|
-I$(LIBPNG_DIR) \
|
|
|
|
-I$(ZLIB_DIR) \
|
|
|
|
-I$(LOADPNG_DIR) \
|
2009-12-11 13:10:56 +00:00
|
|
|
-I$(TINYXML_DIR) \
|
2010-01-25 22:22:36 +00:00
|
|
|
-I$(VACA_DIR)/include \
|
2009-11-19 00:34:07 +00:00
|
|
|
-Wno-deprecated-declarations \
|
2010-01-25 22:22:36 +00:00
|
|
|
-DPNG_NO_MMX_CODE \
|
|
|
|
-DVACA_ALLEGRO
|
2007-09-18 23:57:02 +00:00
|
|
|
|
2007-12-05 01:30:50 +00:00
|
|
|
LFLAGS += $(THIRD_PARTY_LIBS)
|
2007-09-18 23:57:02 +00:00
|
|
|
|
|
|
|
ifdef PROFILE
|
2010-04-20 01:39:53 +00:00
|
|
|
CFLAGS += -pg -O3 -DNDEBUG
|
|
|
|
LFLAGS += -pg -O3 -DNDEBUG
|
2007-09-18 23:57:02 +00:00
|
|
|
else
|
|
|
|
ifdef DEBUGMODE
|
2008-09-29 23:58:07 +00:00
|
|
|
CFLAGS += -g3 -DDEBUGMODE
|
|
|
|
LFLAGS += -g3
|
2007-09-18 23:57:02 +00:00
|
|
|
else
|
2007-12-13 15:55:01 +00:00
|
|
|
CFLAGS += -s -O3 -DNDEBUG
|
|
|
|
LFLAGS += -s -O3 -DNDEBUG
|
2007-09-18 23:57:02 +00:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2008-02-10 19:06:03 +00:00
|
|
|
ifdef MEMLEAK
|
|
|
|
CFLAGS += -DMEMLEAK
|
|
|
|
endif
|
|
|
|
|
2007-09-18 23:57:02 +00:00
|
|
|
ifdef DEFAULT_PREFIX
|
|
|
|
CFLAGS += -DDEFAULT_PREFIX="\"$(DEFAULT_PREFIX)\""
|
|
|
|
endif
|
|
|
|
|
2008-03-15 01:54:45 +00:00
|
|
|
ifdef USE_MMX_ASM
|
2010-03-24 17:10:46 +00:00
|
|
|
CFLAGS += -mmmx
|
2008-03-15 01:54:45 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef USE_SSE_ASM
|
2010-03-24 17:10:46 +00:00
|
|
|
CFLAGS += -msse
|
2007-12-11 20:05:18 +00:00
|
|
|
endif
|
|
|
|
|
2009-11-22 14:39:52 +00:00
|
|
|
ifdef HAVE_RESIZE_PATCH
|
|
|
|
CFLAGS += -DHAVE_RESIZE_PATCH
|
|
|
|
endif
|
|
|
|
|
2007-09-18 23:57:02 +00:00
|
|
|
######################################################################
|
|
|
|
# Rules to make third party libraries
|
|
|
|
|
2007-11-28 14:19:36 +00:00
|
|
|
$(LIBART_LIB): $(LIBART_OBJS)
|
|
|
|
-rm -f $@
|
|
|
|
ar rs $@ $^
|
|
|
|
|
2007-12-05 01:30:50 +00:00
|
|
|
$(LIBFREETYPE_LIB): $(LIBFREETYPE_OBJS)
|
|
|
|
-rm -f $@
|
|
|
|
ar rs $@ $^
|
|
|
|
|
2007-11-28 14:19:36 +00:00
|
|
|
$(LIBGD_LIB): $(LIBGD_OBJS)
|
2007-09-18 23:57:02 +00:00
|
|
|
-rm -f $@
|
|
|
|
ar rs $@ $^
|
|
|
|
|
2007-11-28 14:19:36 +00:00
|
|
|
$(LIBJPEG_LIB): $(LIBJPEG_OBJS)
|
|
|
|
-rm -f $@
|
|
|
|
ar rs $@ $^
|
|
|
|
|
2007-09-20 00:32:35 +00:00
|
|
|
$(LIBPNG_LIB): $(LIBPNG_OBJS)
|
|
|
|
-rm -f $@
|
|
|
|
ar rs $@ $^
|
|
|
|
|
|
|
|
$(ZLIB_LIB): $(ZLIB_OBJS)
|
|
|
|
-rm -f $@
|
|
|
|
ar rs $@ $^
|
|
|
|
|
2009-11-19 00:34:07 +00:00
|
|
|
$(LOADPNG_LIB): $(LOADPNG_OBJS)
|
|
|
|
-rm -f $@
|
|
|
|
ar rs $@ $^
|
|
|
|
|
2009-12-11 13:10:56 +00:00
|
|
|
$(TINYXML_LIB): $(TINYXML_OBJS)
|
|
|
|
-rm -f $@
|
|
|
|
ar rs $@ $^
|
|
|
|
|
2010-03-10 02:34:50 +00:00
|
|
|
$(VACA_LIB): $(VACA_OBJS)
|
|
|
|
-rm -f $@
|
|
|
|
ar rs $@ $^
|
|
|
|
|
2007-09-18 23:57:02 +00:00
|
|
|
######################################################################
|
|
|
|
# Rules to build objects and the application
|
|
|
|
|
|
|
|
VPATH = src \
|
2009-06-01 02:59:15 +00:00
|
|
|
src/ase \
|
2007-09-23 20:13:58 +00:00
|
|
|
src/commands \
|
2007-11-08 00:54:31 +00:00
|
|
|
src/commands/fx \
|
2007-09-18 23:57:02 +00:00
|
|
|
src/console \
|
|
|
|
src/core \
|
|
|
|
src/dialogs \
|
|
|
|
src/effect \
|
|
|
|
src/file \
|
2008-02-12 12:46:39 +00:00
|
|
|
src/file/fli \
|
2007-09-18 23:57:02 +00:00
|
|
|
src/file/gif \
|
|
|
|
src/intl \
|
2007-12-05 01:30:50 +00:00
|
|
|
src/jinete \
|
|
|
|
src/jinete/themes \
|
2007-09-18 23:57:02 +00:00
|
|
|
src/modules \
|
|
|
|
src/raster \
|
2007-12-11 20:05:18 +00:00
|
|
|
src/raster/x86 \
|
- All tools stuff refactored in various files/components.
- Added classes: IToolLoop, Tool, ToolGroup, ToolInk, ToolController, ToolPointShape, ToolIntertwine, ToolBox, etc.
- Added ToolLoopManager.
- Removed old src/modules/tools.cpp.
- Added ISettings and UISettingsImpl, adding the tools settings (onion skinning, grid, tiled mode, etc.).
- Added App::PenSizeBeforeChange, PenSizeAfterChange, CurrentToolChange signals.
- Renamed Context::get_bg/fg_color to getBg/FgColor.
- Refactored Brush class to Pen and added PenType.
- Renamed tiled_t to TiledMode.
- get_config_rect now uses the new Rect class imported from Vaca instead of old jrect.
- Added default_skin.xml to load tool icons.
- Added pen preview in Editor::cursor stuff.
- Added Editor::decorators.
Note: This big patch is from some time ago. I did my best to pre-commit other small changes before this big one.
2010-03-07 19:47:45 +00:00
|
|
|
src/settings \
|
|
|
|
src/tools \
|
2007-09-18 23:57:02 +00:00
|
|
|
src/util \
|
|
|
|
src/widgets \
|
|
|
|
src/widgets/editor \
|
2007-11-28 14:19:36 +00:00
|
|
|
$(LIBART_DIR) \
|
2007-12-05 01:30:50 +00:00
|
|
|
$(LIBFREETYPE_DIR)/src/base \
|
|
|
|
$(LIBFREETYPE_DIR)/src/autohint \
|
|
|
|
$(LIBFREETYPE_DIR)/src/cache \
|
|
|
|
$(LIBFREETYPE_DIR)/src/cff \
|
|
|
|
$(LIBFREETYPE_DIR)/src/cid \
|
|
|
|
$(LIBFREETYPE_DIR)/src/pcf \
|
|
|
|
$(LIBFREETYPE_DIR)/src/psaux \
|
|
|
|
$(LIBFREETYPE_DIR)/src/pshinter \
|
|
|
|
$(LIBFREETYPE_DIR)/src/psnames \
|
|
|
|
$(LIBFREETYPE_DIR)/src/raster \
|
|
|
|
$(LIBFREETYPE_DIR)/src/sfnt \
|
|
|
|
$(LIBFREETYPE_DIR)/src/smooth \
|
|
|
|
$(LIBFREETYPE_DIR)/src/truetype \
|
|
|
|
$(LIBFREETYPE_DIR)/src/type1 \
|
|
|
|
$(LIBFREETYPE_DIR)/src/winfonts \
|
2007-11-28 14:19:36 +00:00
|
|
|
$(LIBGD_DIR) \
|
|
|
|
$(LIBJPEG_DIR) \
|
2007-09-20 00:32:35 +00:00
|
|
|
$(LIBPNG_DIR) \
|
2009-11-19 00:34:07 +00:00
|
|
|
$(ZLIB_DIR) \
|
2009-12-11 13:10:56 +00:00
|
|
|
$(LOADPNG_DIR) \
|
2010-03-10 02:34:50 +00:00
|
|
|
$(TINYXML_DIR) \
|
|
|
|
$(VACA_DIR)/src
|
2007-09-18 23:57:02 +00:00
|
|
|
|
2008-02-11 01:56:20 +00:00
|
|
|
ASE_DEPS = $(ASE_OBJS) $(THIRD_PARTY_LIBS)
|
2007-09-18 23:57:02 +00:00
|
|
|
|
2007-12-05 03:29:17 +00:00
|
|
|
######################################################################
|
|
|
|
# Rules to build the object files
|
2007-11-28 14:19:36 +00:00
|
|
|
|
2008-09-30 21:01:54 +00:00
|
|
|
$(OBJ_DIR)/%$(OBJ): %.cpp
|
|
|
|
$(CPP) $(CFLAGS) -o $@ -c $<
|
2007-11-28 14:19:36 +00:00
|
|
|
|
2007-12-11 20:05:18 +00:00
|
|
|
$(OBJ_DIR)/%$(OBJ): %.s
|
|
|
|
$(CC) $(CFLAGS) -x assembler-with-cpp -o $@ -c $<
|
|
|
|
|
2007-11-28 14:19:36 +00:00
|
|
|
$(OBJ_DIR)/art.%$(OBJ): %.c
|
|
|
|
$(CC) $(CFLAGS) -o $@ -c $<
|
|
|
|
|
2007-12-05 01:30:50 +00:00
|
|
|
$(OBJ_DIR)/freetype.%$(OBJ): %.c
|
|
|
|
$(CC) $(CFLAGS) -o $@ -c $<
|
|
|
|
|
2007-11-28 14:19:36 +00:00
|
|
|
$(OBJ_DIR)/gd.%$(OBJ): %.c
|
|
|
|
$(CC) $(CFLAGS) -DNONDLL -DHAVE_CONFIG_H -o $@ -c $<
|
|
|
|
|
|
|
|
$(OBJ_DIR)/jpeg.%$(OBJ): %.c
|
|
|
|
$(CC) $(CFLAGS) -o $@ -c $<
|
|
|
|
|
|
|
|
$(OBJ_DIR)/png.%$(OBJ): %.c
|
|
|
|
$(CC) $(CFLAGS) -I$(LIBPNG_DIR) -o $@ -c $<
|
|
|
|
|
|
|
|
$(OBJ_DIR)/zlib.%$(OBJ): %.c
|
2009-11-19 00:34:07 +00:00
|
|
|
$(CC) $(CFLAGS) -o $@ -c $<
|
|
|
|
|
|
|
|
$(OBJ_DIR)/loadpng.%$(OBJ): %.c
|
2007-11-28 14:19:36 +00:00
|
|
|
$(CC) $(CFLAGS) -o $@ -c $<
|
|
|
|
|
2009-12-11 13:10:56 +00:00
|
|
|
$(OBJ_DIR)/tinyxml.%$(OBJ): %.cpp
|
2010-03-10 02:34:50 +00:00
|
|
|
$(CPP) $(CFLAGS) -o $@ -c $<
|
|
|
|
|
|
|
|
$(OBJ_DIR)/vaca.%$(OBJ): %.cpp
|
2009-12-11 13:10:56 +00:00
|
|
|
$(CPP) $(CFLAGS) -o $@ -c $<
|
|
|
|
|
2007-12-05 03:29:17 +00:00
|
|
|
######################################################################
|
|
|
|
# Application
|
2007-11-28 14:19:36 +00:00
|
|
|
|
2007-09-18 23:57:02 +00:00
|
|
|
ifndef WITHICON
|
|
|
|
$(ASE): $(ASE_DEPS)
|
2008-09-30 21:01:54 +00:00
|
|
|
$(CPP) -o $@ $(ASE_OBJS) $(LFLAGS) $(LFLAGS_LAST)
|
2007-09-18 23:57:02 +00:00
|
|
|
else
|
|
|
|
$(OBJ_DIR)/%.res: src/%.rc
|
|
|
|
$(WINDRES) -O coff -o $@ -i $<
|
|
|
|
|
|
|
|
$(ASE): $(ASE_DEPS) $(OBJ_DIR)/icon.res
|
2008-09-30 21:01:54 +00:00
|
|
|
$(CPP) -o $@ $(ASE_OBJS) $(OBJ_DIR)/icon.res $(LFLAGS) $(LFLAGS_LAST)
|
2007-09-18 23:57:02 +00:00
|
|
|
endif
|
2007-12-05 03:29:17 +00:00
|
|
|
|
|
|
|
######################################################################
|
|
|
|
# Rules to make tests
|
|
|
|
|
2008-09-30 23:04:33 +00:00
|
|
|
src/tests/%$(EXE): src/tests/%.cpp $(COMMON_OBJS)
|
2008-09-30 21:01:54 +00:00
|
|
|
$(CPP) $(CFLAGS) -o $@ $^ $(LFLAGS) $(LFLAGS_LAST)
|
2008-01-13 20:49:02 +00:00
|
|
|
|
2008-09-30 23:04:33 +00:00
|
|
|
src/tests/raster/%$(EXE): src/tests/raster/%.cpp $(COMMON_OBJS)
|
2008-09-30 21:01:54 +00:00
|
|
|
$(CPP) $(CFLAGS) -o $@ $^ $(LFLAGS) $(LFLAGS_LAST)
|
2007-12-05 03:29:17 +00:00
|
|
|
|
2008-09-30 23:04:33 +00:00
|
|
|
src/tests/jinete/%$(EXE): src/tests/jinete/%.cpp $(COMMON_OBJS)
|
2008-09-30 21:01:54 +00:00
|
|
|
$(CPP) $(CFLAGS) -o $@ $^ $(LFLAGS) $(LFLAGS_LAST)
|
2007-12-05 03:29:17 +00:00
|
|
|
|
2008-09-30 23:04:33 +00:00
|
|
|
tests: $(TESTS)
|
2008-02-04 02:37:26 +00:00
|
|
|
|
2008-09-30 23:04:33 +00:00
|
|
|
runtests: $(AUTOTESTS)
|
2008-03-15 01:54:45 +00:00
|
|
|
@-$(foreach TEST, $(AUTOTESTS), \
|
2008-10-02 02:31:07 +00:00
|
|
|
echo Running ./$(TEST) ... ; \
|
|
|
|
if ./$(TEST) ; then \
|
|
|
|
echo " - OK" ; \
|
|
|
|
else \
|
|
|
|
echo " - *FAIL*" ; \
|
|
|
|
fi ; \
|
2008-03-15 01:54:45 +00:00
|
|
|
)
|