<commit_before># Simple makefile for skia library and test apps

# setup our defaults
CC := gcc
GPP := g++
C_INCLUDES := -Iinclude/config -Iinclude/core -Iinclude/effects -Iinclude/images -Iinclude/gpu -Iinclude/utils -Igpu/include

CFLAGS := -Wall -fstrict-aliasing
#CFLAGS += -W -Wextra -Wcast-align -Wchar-subscripts -Wformat -Wformat-security -Wno-format-y2k -Wno-parentheses -Wno-unused-parameter -Wpointer-arith  -Wreturn-type -Wundef -Wwrite-strings
CFLAGS_SSE2 = $(CFLAGS) -msse2
LINKER_OPTS := -lpthread -lz
DEFINES := -DSK_CAN_USE_FLOAT
HIDE = @

ifeq ($(SKIA_SCALAR),fixed)
	DEFINES += -DSK_SCALAR_IS_FIXED
else
	DEFINES += -DSK_SCALAR_IS_FLOAT
endif

ifeq ($(SKIA_DEBUG),true)
 	DEFINES += -DSK_DEBUG -DSK_SUPPORT_UNIT -DGR_DEBUG=1
	CFLAGS += -g
else
	CFLAGS += -O2
	DEFINES += -DSK_RELEASE -DGR_DEBUG=0
endif

DEFINES += -DSK_SUPPORT_LCDTEXT

ifneq ($(SKIA_PDF_SUPPORT),false)
	DEFINES += -DSK_SUPPORT_PDF
ifneq ($(SKIA_DEBUG),true)
	DEFINES += -DSK_ZLIB_INCLUDE="<zlib.h>"
endif
endif

# start with the core (required)
include src/core/core_files.mk
SRC_LIST := $(addprefix src/core/, $(SOURCE))

# add the opts (optimizations)
include src/opts/opts_sse2_files.mk
#include src/opts/opts_files.mk
SRC_LIST += $(addprefix src/opts/, $(SOURCE))

# we usually need ports
include src/ports/ports_files.mk
SRC_LIST += $(addprefix src/ports/, $(SOURCE))

# do we want effects?
include src/effects/effects_files.mk
SRC_LIST += $(addprefix src/effects/, $(SOURCE))

# core image files
include src/images/images_files.mk
SRC_LIST += $(addprefix src/images/, $(SOURCE))

# core util files
include src/utils/utils_files.mk
SRC_LIST += $(addprefix src/utils/, $(SOURCE))

# GPU files
include gpu/src/gr_files.mk
SRC_LIST += $(addprefix gpu/src/, $(SOURCE))

# GPU support files
include src/gpu/skgr_files.mk
SRC_LIST += $(addprefix src/gpu/, $(SOURCE))

# pdf backend files
ifneq ($(SKIA_PDF_SUPPORT),false)
	C_INCLUDES += -Iinclude/pdf
	include src/pdf/pdf_files.mk
	SRC_LIST += $(addprefix src/pdf/, $(SOURCE))
endif

# extra files we want to build to prevent bit-rot, but not link
JUST_COMPILE_LIST := src/ports/SkFontHost_tables.cpp

# conditional files based on our platform
ifeq ($(SKIA_BUILD_FOR),mac)
	# make it work with 10.4 for our font port
#	GPP := g++-4.0
#	SDK := /Developer/SDKs/MacOSX10.4u.sdk
#	SDK_OPTS := -isysroot $(SDK) -mmacosx-version-min=10.4
#	CC := gcc-4.0 $(SDK_OPTS)

	C_INCLUDES += -I/opt/local/include
	LINKER_OPTS += -L/opt/local/lib -framework Carbon -lpng12 -framework OpenGL -framework AGL
	DEFINES += -DSK_BUILD_FOR_MAC -DSK_ENABLE_LIBPNG

	C_INCLUDES += -Iinclude/utils/mac<commit_msg>change -lpng12 to -lpng The distinction doesn't seem necessary, and newer installs are getting 1.4 or later of libpng<commit_after># Simple makefile for skia library and test apps

# setup our defaults
CC := gcc
GPP := g++
C_INCLUDES := -Iinclude/config -Iinclude/core -Iinclude/effects -Iinclude/images -Iinclude/gpu -Iinclude/utils -Igpu/include

CFLAGS := -Wall -fstrict-aliasing
#CFLAGS += -W -Wextra -Wcast-align -Wchar-subscripts -Wformat -Wformat-security -Wno-format-y2k -Wno-parentheses -Wno-unused-parameter -Wpointer-arith  -Wreturn-type -Wundef -Wwrite-strings
CFLAGS_SSE2 = $(CFLAGS) -msse2
LINKER_OPTS := -lpthread -lz
DEFINES := -DSK_CAN_USE_FLOAT
HIDE = @

ifeq ($(SKIA_SCALAR),fixed)
	DEFINES += -DSK_SCALAR_IS_FIXED
else
	DEFINES += -DSK_SCALAR_IS_FLOAT
endif

ifeq ($(SKIA_DEBUG),true)
 	DEFINES += -DSK_DEBUG -DSK_SUPPORT_UNIT -DGR_DEBUG=1
	CFLAGS += -g
else
	CFLAGS += -O2
	DEFINES += -DSK_RELEASE -DGR_DEBUG=0
endif

DEFINES += -DSK_SUPPORT_LCDTEXT

ifneq ($(SKIA_PDF_SUPPORT),false)
	DEFINES += -DSK_SUPPORT_PDF
ifneq ($(SKIA_DEBUG),true)
	DEFINES += -DSK_ZLIB_INCLUDE="<zlib.h>"
endif
endif

# start with the core (required)
include src/core/core_files.mk
SRC_LIST := $(addprefix src/core/, $(SOURCE))

# add the opts (optimizations)
include src/opts/opts_sse2_files.mk
#include src/opts/opts_files.mk
SRC_LIST += $(addprefix src/opts/, $(SOURCE))

# we usually need ports
include src/ports/ports_files.mk
SRC_LIST += $(addprefix src/ports/, $(SOURCE))

# do we want effects?
include src/effects/effects_files.mk
SRC_LIST += $(addprefix src/effects/, $(SOURCE))

# core image files
include src/images/images_files.mk
SRC_LIST += $(addprefix src/images/, $(SOURCE))

# core util files
include src/utils/utils_files.mk
SRC_LIST += $(addprefix src/utils/, $(SOURCE))

# GPU files
include gpu/src/gr_files.mk
SRC_LIST += $(addprefix gpu/src/, $(SOURCE))

# GPU support files
include src/gpu/skgr_files.mk
SRC_LIST += $(addprefix src/gpu/, $(SOURCE))

# pdf backend files
ifneq ($(SKIA_PDF_SUPPORT),false)
	C_INCLUDES += -Iinclude/pdf
	include src/pdf/pdf_files.mk
	SRC_LIST += $(addprefix src/pdf/, $(SOURCE))
endif

# extra files we want to build to prevent bit-rot, but not link
JUST_COMPILE_LIST := src/ports/SkFontHost_tables.cpp

# conditional files based on our platform
ifeq ($(SKIA_BUILD_FOR),mac)
	# make it work with 10.4 for our font port
#	GPP := g++-4.0
#	SDK := /Developer/SDKs/MacOSX10.4u.sdk
#	SDK_OPTS := -isysroot $(SDK) -mmacosx-version-min=10.4
#	CC := gcc-4.0 $(SDK_OPTS)

	C_INCLUDES += -I/opt/local/include
	LINKER_OPTS += -L/opt/local/lib -framework Carbon -lpng -framework OpenGL -framework AGL
	DEFINES += -DSK_BUILD_FOR_MAC -DSK_ENABLE_LIBPNG

	C_INCLUDES += -Iinclude/utils/mac
{'fraction_non_alphanumeric': 0.13780852655198206, 'fraction_numerical': 0.008601346297681375, 'mean_word_length': 4.5602910602910605, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1574384', 'n_tokens_mistral': 2097, 'n_tokens_neox': 2008, 'n_words': 487}