aseprite/makefile.vc
David Capello c4be9fe5b4 Added Context and UIContext classes.
Added CurrentSprite class.
Removed current_sprite global.
Moved all functions of 'sprites' module to Context/UIContext.
2009-06-01 02:59:15 +00:00

172 lines
3.6 KiB
Makefile

# Copyright (C) 2001-2009 by David Capello -*-Makefile-*-
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 \
-I. -Isrc -Ithird_party -W1 -Gd -EHa \
-I$(LIBFREETYPE_DIR)/include \
-I$(LIBJPEG_DIR) \
-I$(LIBPNG_DIR) \
-I$(ZLIB_DIR) \
-DPNG_NO_MMX_CODE
LFLAGS = -NOLOGO -SUBSYSTEM:WINDOWS -MACHINE:X86
LIBS = User32.lib Shell32.lib ComCtl32.lib ComDlg32.lib Gdi32.lib \
Msimg32.lib WinMM.lib AdvAPI32.lib Ole32.lib ShLwApi.lib Vfw32.Lib
ifdef DEBUGMODE
CFLAGS += -Zi -MDd -DDEBUGMODE
LFLAGS += -DEBUG
LIBS += Alld.lib psapi.lib
else
CFLAGS += -O2 -MD -DNDEBUG
LFLAGS += -RELEASE
LIBS += Alleg.lib
endif
######################################################################
# 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 $@
lib -NOLOGO /OUT:$@ $^
$(LIBFREETYPE_LIB): $(LIBFREETYPE_OBJS)
-rm -f $@
lib -NOLOGO /OUT:$@ $^
$(LIBGD_LIB): $(LIBGD_OBJS)
-rm -f $@
lib -NOLOGO /OUT:$@ $^
$(LIBJPEG_LIB): $(LIBJPEG_OBJS)
-rm -f $@
lib -NOLOGO /OUT:$@ $^
$(LIBPNG_LIB): $(LIBPNG_OBJS)
-rm -f $@
lib -NOLOGO /OUT:$@ $^
$(ZLIB_LIB): $(ZLIB_OBJS)
-rm -f $@
lib -NOLOGO /OUT:$@ $^
######################################################################
# Rules to build objects and the application
VPATH = src \
src/ase \
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 \
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) \
$(ZLIB_DIR)
ASE_DEPS = $(ASE_OBJS) $(THIRD_PARTY_LIBS)
######################################################################
# Rules to build the object files
$(OBJ_DIR)/%$(OBJ): %.cpp
$(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 $<
######################################################################
# Application
$(OBJ_DIR)/icon.res: src/icon.rc
$(RC) $<
mv src/icon.res $@
$(ASE): $(ASE_DEPS) $(OBJ_DIR)/icon.res
link $(LFLAGS) $^ $(LIBS) -OUT:$@