2009-01-24 00:41:01 +00:00
|
|
|
# Copyright (C) 2001-2009 by David Capello -*-Makefile-*-
|
2008-09-30 16:10:12 +00:00
|
|
|
|
|
|
|
ifndef CONFIGURED
|
|
|
|
include makefile.cfg
|
|
|
|
endif
|
|
|
|
|
|
|
|
.PHONY = cfgtest
|
|
|
|
|
|
|
|
ifndef CONFIGURED
|
|
|
|
cfgtest:
|
|
|
|
@echo You must configure ASE: edit \"makefile.cfg\" or run \"fix.sh\" script
|
|
|
|
endif
|
|
|
|
|
|
|
|
######################################################################
|
|
|
|
# MSVC specific
|
|
|
|
|
|
|
|
CC = cl
|
|
|
|
RC = rc
|
|
|
|
OBJ = .obj
|
|
|
|
EXE = .exe
|
|
|
|
LIB_EXT = .lib
|
|
|
|
OBJ_DIR = obj/msvc
|
|
|
|
|
|
|
|
include makefile.lst
|
|
|
|
|
|
|
|
CFLAGS = -nologo \
|
2009-08-17 18:00:38 +00:00
|
|
|
-I. -Isrc -Ithird_party -W3 -Gd -EHa \
|
2008-09-30 16:10:12 +00:00
|
|
|
-I$(LIBFREETYPE_DIR)/include \
|
|
|
|
-I$(LIBJPEG_DIR) \
|
|
|
|
-I$(LIBPNG_DIR) \
|
|
|
|
-I$(ZLIB_DIR) \
|
2009-11-19 00:34:07 +00:00
|
|
|
-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 \
|
|
|
|
-DPNG_NO_MMX_CODE \
|
|
|
|
-DVACA_ALLEGRO
|
2008-09-30 16:10:12 +00:00
|
|
|
|
2008-10-11 15:59:13 +00:00
|
|
|
LFLAGS = -NOLOGO -SUBSYSTEM:WINDOWS -MACHINE:X86
|
2008-09-30 16:10:12 +00:00
|
|
|
|
|
|
|
LIBS = User32.lib Shell32.lib ComCtl32.lib ComDlg32.lib Gdi32.lib \
|
2010-03-07 18:13:33 +00:00
|
|
|
Msimg32.lib WinMM.lib AdvAPI32.lib Ole32.lib ShLwApi.lib Vfw32.Lib \
|
2010-03-13 01:16:05 +00:00
|
|
|
wininet.lib ddraw.lib dxguid.lib dsound.lib dinput8.lib
|
2008-09-30 16:10:12 +00:00
|
|
|
|
|
|
|
ifdef DEBUGMODE
|
2010-03-07 18:13:33 +00:00
|
|
|
ifdef STATIC_ALLEG_LINK
|
|
|
|
CFLAGS += -Zi -MTd -DDEBUGMODE -DALLEGRO_STATICLINK
|
|
|
|
LFLAGS += -DEBUG
|
|
|
|
LIBS += alld_s_crt.lib psapi.lib
|
|
|
|
else
|
|
|
|
CFLAGS += -Zi -MDd -DDEBUGMODE
|
|
|
|
LFLAGS += -DEBUG
|
|
|
|
LIBS += Alld.lib psapi.lib
|
|
|
|
endif
|
2008-09-30 16:10:12 +00:00
|
|
|
else
|
2009-08-05 01:53:02 +00:00
|
|
|
ifdef RELEASE
|
|
|
|
CFLAGS += -O2 -DNDEBUG
|
|
|
|
LFLAGS += -RELEASE
|
|
|
|
|
|
|
|
ifdef STATIC_ALLEG_LINK
|
|
|
|
CFLAGS += -MT -DALLEGRO_STATICLINK
|
|
|
|
LIBS += Alleg_s_crt.lib
|
|
|
|
LIBS += dinput8.lib ddraw.lib dxguid.lib dsound.lib
|
|
|
|
else
|
|
|
|
CFLAGS += -MD
|
|
|
|
LIBS += Alleg.lib
|
|
|
|
endif
|
|
|
|
else
|
|
|
|
# Release with debug info
|
|
|
|
CFLAGS += -Zi -O2 -MD -DNDEBUG
|
|
|
|
LFLAGS += -DEBUG
|
|
|
|
LIBS += Alleg.lib
|
|
|
|
LIBS += psapi.lib
|
|
|
|
endif
|
2008-09-30 16:10:12 +00:00
|
|
|
endif
|
|
|
|
|
2009-07-12 20:29:16 +00:00
|
|
|
ifdef MEMLEAK
|
|
|
|
CFLAGS += -DMEMLEAK
|
|
|
|
LIBS += dbghelp.lib
|
|
|
|
endif
|
|
|
|
|
2009-11-22 14:39:52 +00:00
|
|
|
ifdef HAVE_RESIZE_PATCH
|
|
|
|
CFLAGS += -DHAVE_RESIZE_PATCH
|
|
|
|
endif
|
|
|
|
|
2008-09-30 16:10:12 +00:00
|
|
|
######################################################################
|
|
|
|
# General rules
|
|
|
|
|
|
|
|
.PHONY = default all clean distclean
|
|
|
|
|
|
|
|
default: all
|
|
|
|
|
|
|
|
all: $(ASE)
|
|
|
|
|
|
|
|
clean:
|
|
|
|
-rm -f $(ALL_OBJS) $(THIRD_PARTY_LIBS) $(OBJ_DIR)/icon.res
|
|
|
|
|
|
|
|
distclean: clean
|
|
|
|
-rm -f $(ASE)
|
|
|
|
|
|
|
|
-include makefile.dep
|
|
|
|
|
|
|
|
######################################################################
|
|
|
|
# Rules to make third party libraries
|
|
|
|
|
|
|
|
$(LIBART_LIB): $(LIBART_OBJS)
|
|
|
|
-rm -f $@
|
2009-08-05 01:53:02 +00:00
|
|
|
lib -NOLOGO -OUT:$@ $^
|
2008-09-30 16:10:12 +00:00
|
|
|
|
|
|
|
$(LIBFREETYPE_LIB): $(LIBFREETYPE_OBJS)
|
|
|
|
-rm -f $@
|
2009-08-05 01:53:02 +00:00
|
|
|
lib -NOLOGO -OUT:$@ $^
|
2008-09-30 16:10:12 +00:00
|
|
|
|
|
|
|
$(LIBGD_LIB): $(LIBGD_OBJS)
|
|
|
|
-rm -f $@
|
2009-08-05 01:53:02 +00:00
|
|
|
lib -NOLOGO -OUT:$@ $^
|
2008-09-30 16:10:12 +00:00
|
|
|
|
|
|
|
$(LIBJPEG_LIB): $(LIBJPEG_OBJS)
|
|
|
|
-rm -f $@
|
2009-08-05 01:53:02 +00:00
|
|
|
lib -NOLOGO -OUT:$@ $^
|
2008-09-30 16:10:12 +00:00
|
|
|
|
|
|
|
$(LIBPNG_LIB): $(LIBPNG_OBJS)
|
|
|
|
-rm -f $@
|
2009-08-05 01:53:02 +00:00
|
|
|
lib -NOLOGO -OUT:$@ $^
|
2008-09-30 16:10:12 +00:00
|
|
|
|
|
|
|
$(ZLIB_LIB): $(ZLIB_OBJS)
|
|
|
|
-rm -f $@
|
2009-08-05 01:53:02 +00:00
|
|
|
lib -NOLOGO -OUT:$@ $^
|
2008-09-30 16:10:12 +00:00
|
|
|
|
2009-11-19 00:34:07 +00:00
|
|
|
$(LOADPNG_LIB): $(LOADPNG_OBJS)
|
|
|
|
-rm -f $@
|
|
|
|
lib -NOLOGO -OUT:$@ $^
|
|
|
|
|
2009-12-11 13:10:56 +00:00
|
|
|
$(TINYXML_LIB): $(TINYXML_OBJS)
|
|
|
|
-rm -f $@
|
|
|
|
lib -NOLOGO -OUT:$@ $^
|
|
|
|
|
2010-03-10 02:34:50 +00:00
|
|
|
$(VACA_LIB): $(VACA_OBJS)
|
|
|
|
-rm -f $@
|
|
|
|
lib -NOLOGO -OUT:$@ $^
|
|
|
|
|
2008-09-30 16:10:12 +00:00
|
|
|
######################################################################
|
|
|
|
# Rules to build objects and the application
|
|
|
|
|
|
|
|
VPATH = src \
|
2009-06-01 02:59:15 +00:00
|
|
|
src/ase \
|
2008-09-30 16:10:12 +00:00
|
|
|
src/commands \
|
|
|
|
src/commands/fx \
|
|
|
|
src/console \
|
|
|
|
src/core \
|
|
|
|
src/dialogs \
|
|
|
|
src/effect \
|
|
|
|
src/file \
|
|
|
|
src/file/fli \
|
|
|
|
src/file/gif \
|
|
|
|
src/intl \
|
|
|
|
src/jinete \
|
|
|
|
src/jinete/themes \
|
|
|
|
src/modules \
|
|
|
|
src/raster \
|
|
|
|
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 \
|
2008-09-30 16:10:12 +00:00
|
|
|
src/util \
|
|
|
|
src/widgets \
|
|
|
|
src/widgets/editor \
|
|
|
|
$(LIBART_DIR) \
|
|
|
|
$(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 \
|
|
|
|
$(LIBGD_DIR) \
|
|
|
|
$(LIBJPEG_DIR) \
|
|
|
|
$(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
|
2008-09-30 16:10:12 +00:00
|
|
|
|
|
|
|
ASE_DEPS = $(ASE_OBJS) $(THIRD_PARTY_LIBS)
|
|
|
|
|
|
|
|
######################################################################
|
|
|
|
# Rules to build the object files
|
|
|
|
|
2008-09-30 21:01:54 +00:00
|
|
|
$(OBJ_DIR)/%$(OBJ): %.cpp
|
2008-09-30 16:10:12 +00:00
|
|
|
$(CC) $(CFLAGS) -Fo$@ -c $<
|
|
|
|
|
|
|
|
$(OBJ_DIR)/art.%$(OBJ): %.c
|
|
|
|
$(CC) $(CFLAGS) -Fo$@ -c $<
|
|
|
|
|
|
|
|
$(OBJ_DIR)/freetype.%$(OBJ): %.c
|
|
|
|
$(CC) $(CFLAGS) -Fo$@ -c $<
|
|
|
|
|
|
|
|
$(OBJ_DIR)/gd.%$(OBJ): %.c
|
|
|
|
$(CC) $(CFLAGS) -DNONDLL -DHAVE_CONFIG_H -Fo$(OBJ_DIR) -c $<
|
|
|
|
|
|
|
|
$(OBJ_DIR)/jpeg.%$(OBJ): %.c
|
|
|
|
$(CC) $(CFLAGS) -Fo$@ -c $<
|
|
|
|
|
|
|
|
$(OBJ_DIR)/png.%$(OBJ): %.c
|
|
|
|
$(CC) $(CFLAGS) -I$(LIBPNG_DIR) -Fo$@ -c $<
|
|
|
|
|
|
|
|
$(OBJ_DIR)/zlib.%$(OBJ): %.c
|
|
|
|
$(CC) $(CFLAGS) -Fo$@ -c $<
|
|
|
|
|
2009-11-19 00:34:07 +00:00
|
|
|
$(OBJ_DIR)/loadpng.%$(OBJ): %.c
|
|
|
|
$(CC) $(CFLAGS) -Fo$@ -c $<
|
|
|
|
|
2009-12-11 13:10:56 +00:00
|
|
|
$(OBJ_DIR)/tinyxml.%$(OBJ): %.cpp
|
|
|
|
$(CC) $(CFLAGS) -Fo$@ -c $<
|
|
|
|
|
2010-03-10 02:34:50 +00:00
|
|
|
$(OBJ_DIR)/vaca.%$(OBJ): %.cpp
|
|
|
|
$(CC) $(CFLAGS) -Fo$@ -c $<
|
|
|
|
|
2008-09-30 16:10:12 +00:00
|
|
|
######################################################################
|
|
|
|
# Application
|
|
|
|
|
|
|
|
$(OBJ_DIR)/icon.res: src/icon.rc
|
|
|
|
$(RC) $<
|
|
|
|
mv src/icon.res $@
|
|
|
|
|
|
|
|
$(ASE): $(ASE_DEPS) $(OBJ_DIR)/icon.res
|
|
|
|
link $(LFLAGS) $^ $(LIBS) -OUT:$@
|
2009-08-05 01:53:02 +00:00
|
|
|
|
|
|
|
# To embed the manifest file uncomment the following lines:
|
|
|
|
# mt -nologo -manifest $@.manifest -outputresource:$@;#2
|
|
|
|
# rm $@.manifest
|