mirror of
https://github.com/aseprite/aseprite.git
synced 2024-09-04 05:59:22 +00:00
Renamed FileType to FileFormat. Moved ase/jinete/src to ase/src/jinete. Moved ase/jinete/include to ase/src/jinete. Moved ase/jinete/freetype to ase/third_party/freetype.
177 lines
3.5 KiB
Makefile
177 lines
3.5 KiB
Makefile
# Copyright (C) 2001-2005, 2007 by David A. Capello -*-Makefile-*-
|
|
|
|
.PHONY = _default
|
|
_default: default
|
|
|
|
######################################################################
|
|
# Setup CFLAGS and LFLAGS for GCC
|
|
|
|
CFLAGS += -Wall -I. -Isrc -Ithird_party \
|
|
-I$(LIBFREETYPE_DIR)/include \
|
|
-I$(LIBLUA_DIR)/include \
|
|
-I$(LIBJPEG_DIR) \
|
|
-I$(LIBGFLI_DIR) \
|
|
-I$(LIBPNG_DIR) \
|
|
-I$(ZLIB_DIR) \
|
|
-Wno-deprecated-declarations \
|
|
-DPNG_NO_MMX_CODE
|
|
|
|
# -I$(LIBGD_DIR)
|
|
|
|
LFLAGS += $(THIRD_PARTY_LIBS)
|
|
|
|
ifdef PROFILE
|
|
CFLAGS += -pg
|
|
LFLAGS += -pg
|
|
else
|
|
ifdef DEBUGMODE
|
|
CFLAGS += -g
|
|
LFLAGS += -g
|
|
else
|
|
CFLAGS += -s -O3
|
|
LFLAGS += -s -O3
|
|
endif
|
|
endif
|
|
|
|
ifdef DEFAULT_PREFIX
|
|
CFLAGS += -DDEFAULT_PREFIX="\"$(DEFAULT_PREFIX)\""
|
|
endif
|
|
|
|
ifdef USE_PRECOMPILED_HEADER
|
|
CFLAGS += -DUSE_PRECOMPILED_HEADER
|
|
endif
|
|
|
|
######################################################################
|
|
# Rules to make third party libraries
|
|
|
|
$(LIBART_LIB): $(LIBART_OBJS)
|
|
-rm -f $@
|
|
ar rs $@ $^
|
|
|
|
$(LIBFREETYPE_LIB): $(LIBFREETYPE_OBJS)
|
|
-rm -f $@
|
|
ar rs $@ $^
|
|
|
|
$(LIBGD_LIB): $(LIBGD_OBJS)
|
|
-rm -f $@
|
|
ar rs $@ $^
|
|
|
|
$(LIBGFLI_LIB): $(LIBGFLI_OBJS)
|
|
-rm -f $@
|
|
ar rs $@ $^
|
|
|
|
$(LIBJPEG_LIB): $(LIBJPEG_OBJS)
|
|
-rm -f $@
|
|
ar rs $@ $^
|
|
|
|
$(LIBLUA_LIB): $(LIBLUA_OBJS)
|
|
-rm -f $@
|
|
ar rs $@ $^
|
|
|
|
$(LIBPNG_LIB): $(LIBPNG_OBJS)
|
|
-rm -f $@
|
|
ar rs $@ $^
|
|
|
|
$(ZLIB_LIB): $(ZLIB_OBJS)
|
|
-rm -f $@
|
|
ar rs $@ $^
|
|
|
|
######################################################################
|
|
# Rules to build objects and the application
|
|
|
|
VPATH = src \
|
|
src/commands \
|
|
src/commands/fx \
|
|
src/console \
|
|
src/core \
|
|
src/dialogs \
|
|
src/effect \
|
|
src/file \
|
|
src/file/gif \
|
|
src/intl \
|
|
src/jinete \
|
|
src/jinete/themes \
|
|
src/modules \
|
|
src/raster \
|
|
src/script \
|
|
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) \
|
|
$(LIBGFLI_DIR) \
|
|
$(LIBJPEG_DIR) \
|
|
$(LIBLUA_DIR)/src \
|
|
$(LIBLUA_DIR)/src/lib \
|
|
$(LIBPNG_DIR) \
|
|
$(ZLIB_DIR)
|
|
|
|
ifdef USE_PRECOMPILED_HEADER
|
|
ASE_DEPS = config.h.gch
|
|
else
|
|
ASE_DEPS =
|
|
endif
|
|
ASE_DEPS += $(ASE_OBJS) $(THIRD_PARTY_LIBS)
|
|
|
|
ifdef USE_PRECOMPILED_HEADER
|
|
config.h.gch: config.h
|
|
$(CC) $(CFLAGS) -o $@ -c $<
|
|
endif
|
|
|
|
# rules to build the object files
|
|
|
|
$(OBJ_DIR)/%$(OBJ): %.c
|
|
$(CC) $(CFLAGS) -o $@ -c $<
|
|
|
|
$(OBJ_DIR)/art.%$(OBJ): %.c
|
|
$(CC) $(CFLAGS) -o $@ -c $<
|
|
|
|
$(OBJ_DIR)/freetype.%$(OBJ): %.c
|
|
$(CC) $(CFLAGS) -o $@ -c $<
|
|
|
|
$(OBJ_DIR)/gd.%$(OBJ): %.c
|
|
$(CC) $(CFLAGS) -DNONDLL -DHAVE_CONFIG_H -o $@ -c $<
|
|
|
|
$(OBJ_DIR)/gfli.%$(OBJ): %.c
|
|
$(CC) $(CFLAGS) -o $@ -c $<
|
|
|
|
$(OBJ_DIR)/jpeg.%$(OBJ): %.c
|
|
$(CC) $(CFLAGS) -o $@ -c $<
|
|
|
|
$(OBJ_DIR)/lua.%$(OBJ): %.c
|
|
$(CC) $(CFLAGS) -o $@ -c $<
|
|
|
|
$(OBJ_DIR)/png.%$(OBJ): %.c
|
|
$(CC) $(CFLAGS) -I$(LIBPNG_DIR) -o $@ -c $<
|
|
|
|
$(OBJ_DIR)/zlib.%$(OBJ): %.c
|
|
$(CC) $(CFLAGS) -o $@ -c $<
|
|
|
|
# application
|
|
|
|
ifndef WITHICON
|
|
$(ASE): $(ASE_DEPS)
|
|
$(CC) -o $@ $(ASE_OBJS) $(LFLAGS) $(LFLAGS_LAST)
|
|
else
|
|
$(OBJ_DIR)/%.res: src/%.rc
|
|
$(WINDRES) -O coff -o $@ -i $<
|
|
|
|
$(ASE): $(ASE_DEPS) $(OBJ_DIR)/icon.res
|
|
$(CC) -o $@ $(ASE_OBJS) $(OBJ_DIR)/icon.res $(LFLAGS) $(LFLAGS_LAST)
|
|
endif
|