Convert the build system to non-recursive make
Speeds up a no-op build from 500ms to 60ms and significantly improves dependency tracking.
27
Makefile
|
@ -1,17 +1,4 @@
|
||||||
include Makefile.inc
|
include header.mk
|
||||||
|
|
||||||
SUBDIRS += \
|
|
||||||
packages/desktop \
|
|
||||||
vendor/luajit \
|
|
||||||
vendor/universalchardet \
|
|
||||||
vendor/luabins \
|
|
||||||
libaegisub \
|
|
||||||
tools \
|
|
||||||
src \
|
|
||||||
automation \
|
|
||||||
po
|
|
||||||
|
|
||||||
all: ;
|
|
||||||
|
|
||||||
ifeq (yes, $(BUILD_DARWIN))
|
ifeq (yes, $(BUILD_DARWIN))
|
||||||
osx-bundle:
|
osx-bundle:
|
||||||
|
@ -22,16 +9,4 @@ osx-dmg: osx-bundle
|
||||||
$(BIN_SHELL) tools/osx-dmg.sh "$(BUILD_VERSION_STRING)"
|
$(BIN_SHELL) tools/osx-dmg.sh "$(BUILD_VERSION_STRING)"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
DISTCLEANFILES += \
|
|
||||||
acconf.h \
|
|
||||||
configure \
|
|
||||||
acconf.h.in~ \
|
|
||||||
build/git_version.h \
|
|
||||||
Makefile.inc \
|
|
||||||
config.log \
|
|
||||||
acconf.h.in \
|
|
||||||
config.status \
|
|
||||||
autom4te.cache \
|
|
||||||
aclocal.m4 \
|
|
||||||
|
|
||||||
include Makefile.target
|
include Makefile.target
|
||||||
|
|
|
@ -9,13 +9,16 @@ HAVE_PORTAUDIO = @with_portaudio@
|
||||||
HAVE_FFMS2 = @with_ffms2@
|
HAVE_FFMS2 = @with_ffms2@
|
||||||
HAVE_LIBPULSE = @with_libpulse@
|
HAVE_LIBPULSE = @with_libpulse@
|
||||||
|
|
||||||
|
##############
|
||||||
|
# BUILD OUTPUT
|
||||||
|
##############
|
||||||
|
PROGRAM := $(PROGRAM)
|
||||||
|
LIB := $(LIB)
|
||||||
|
|
||||||
###################
|
###################
|
||||||
# PLATFORM SETTINGS
|
# PLATFORM SETTINGS
|
||||||
###################
|
###################
|
||||||
BUILD_BSD = @build_bsd@
|
|
||||||
BUILD_DARWIN = @build_darwin@
|
BUILD_DARWIN = @build_darwin@
|
||||||
BUILD_DEFAULT = @build_default@
|
|
||||||
BUILD_LINUX = @build_linux@
|
|
||||||
|
|
||||||
#######
|
#######
|
||||||
# FLAGS
|
# FLAGS
|
||||||
|
@ -23,7 +26,7 @@ BUILD_LINUX = @build_linux@
|
||||||
CFLAGS = @CFLAGS@
|
CFLAGS = @CFLAGS@
|
||||||
CXXFLAGS = @CXXFLAGS@
|
CXXFLAGS = @CXXFLAGS@
|
||||||
CPPFLAGS = @CPPFLAGS@
|
CPPFLAGS = @CPPFLAGS@
|
||||||
CFLAGS_DEP = -MD -MP
|
CFLAGS_DEP = -MMD -MP
|
||||||
LIBS = @LIBS@
|
LIBS = @LIBS@
|
||||||
LDFLAGS = @LDFLAGS@
|
LDFLAGS = @LDFLAGS@
|
||||||
INSTALL_FLAGS = -m 664
|
INSTALL_FLAGS = -m 664
|
||||||
|
@ -36,27 +39,18 @@ LIB_SHARED_LINK_OSX = -dynamiclib -Wl,-undefined -Wl,dynamic_lookup -compatibili
|
||||||
AEGISUB_COMMAND = @AEGISUB_COMMAND@
|
AEGISUB_COMMAND = @AEGISUB_COMMAND@
|
||||||
AEGISUB_CATALOG = @AEGISUB_CATALOG@
|
AEGISUB_CATALOG = @AEGISUB_CATALOG@
|
||||||
BUILD_DATE = @BUILD_DATE@
|
BUILD_DATE = @BUILD_DATE@
|
||||||
PACKAGE_TARNAME = aegisub-@BUILD_GIT_VERSION_STRING@
|
|
||||||
PACKAGE_DEBUG = @PACKAGE_DEBUG@
|
|
||||||
BUILD_VERSION_STRING = @BUILD_GIT_VERSION_STRING@
|
BUILD_VERSION_STRING = @BUILD_GIT_VERSION_STRING@
|
||||||
|
|
||||||
#######
|
#######
|
||||||
# PATHS
|
# PATHS
|
||||||
#######
|
#######
|
||||||
P_PREFIX = @prefix@
|
|
||||||
prefix = ${P_PREFIX}
|
prefix = ${P_PREFIX}
|
||||||
P_PREFIX_EXEC = @exec_prefix@
|
|
||||||
exec_prefix = ${P_PREFIX_EXEC}
|
exec_prefix = ${P_PREFIX_EXEC}
|
||||||
P_BINDIR = @bindir@
|
|
||||||
P_SBINDIR = @sbindir@
|
|
||||||
P_LIBEXEC = @libexecdir@
|
|
||||||
P_DATAROOT = @datarootdir@
|
|
||||||
datarootdir = ${P_DATAROOT}
|
datarootdir = ${P_DATAROOT}
|
||||||
P_SYSCONF = @sysconfdir@
|
P_PREFIX = @prefix@
|
||||||
P_SHAREDSTATE = @sharedstatedir@
|
P_PREFIX_EXEC = @exec_prefix@
|
||||||
P_LOCALSTATE = @localstatedir@
|
P_BINDIR = @bindir@
|
||||||
P_INCLUDE = @includedir@
|
P_DATAROOT = @datarootdir@
|
||||||
P_LIB = @libdir@
|
|
||||||
P_LOCALE = @localedir@
|
P_LOCALE = @localedir@
|
||||||
|
|
||||||
P_DESKTOP = @P_DESKTOP@
|
P_DESKTOP = @P_DESKTOP@
|
||||||
|
@ -83,14 +77,13 @@ CFLAGS_HUNSPELL = @HUNSPELL_CFLAGS@
|
||||||
CFLAGS_ICONV = @ICONV_CFLAGS@
|
CFLAGS_ICONV = @ICONV_CFLAGS@
|
||||||
CFLAGS_ICU = @ICU_I18N_CFLAGS@
|
CFLAGS_ICU = @ICU_I18N_CFLAGS@
|
||||||
CFLAGS_LIBASS = @LIBASS_CFLAGS@
|
CFLAGS_LIBASS = @LIBASS_CFLAGS@
|
||||||
CFLAGS_LIBCURL = @LIBCURL_CFLAGS@
|
|
||||||
CFLAGS_LIBPULSE = @LIBPULSE_CFLAGS@
|
CFLAGS_LIBPULSE = @LIBPULSE_CFLAGS@
|
||||||
CFLAGS_LUA = -I../vendor/luajit/include
|
CFLAGS_LUA = -I$(TOP)vendor/luajit/include
|
||||||
CFLAGS_OPENAL = @OPENAL_CFLAGS@
|
CFLAGS_OPENAL = @OPENAL_CFLAGS@
|
||||||
CFLAGS_OSS = @OSS_CFLAGS@
|
CFLAGS_OSS = @OSS_CFLAGS@
|
||||||
CFLAGS_PORTAUDIO = @PORTAUDIO_CFLAGS@
|
CFLAGS_PORTAUDIO = @PORTAUDIO_CFLAGS@
|
||||||
CFLAGS_PTHREAD = @PTHREAD_CFLAGS@
|
CFLAGS_PTHREAD = @PTHREAD_CFLAGS@
|
||||||
CFLAGS_UCHARDET = -I../vendor/universalchardet
|
CFLAGS_UCHARDET = -I$(TOP)vendor/universalchardet
|
||||||
|
|
||||||
LIBS_ALSA = @ALSA_LIBS@
|
LIBS_ALSA = @ALSA_LIBS@
|
||||||
LIBS_FFMS2 = @FFMS2_LIBS@
|
LIBS_FFMS2 = @FFMS2_LIBS@
|
||||||
|
@ -102,23 +95,20 @@ LIBS_HUNSPELL = @HUNSPELL_LIBS@
|
||||||
LIBS_ICONV = @ICONV_LIBS@
|
LIBS_ICONV = @ICONV_LIBS@
|
||||||
LIBS_ICU = @ICU_UC_LIBS@ @ICU_I18N_LIBS@
|
LIBS_ICU = @ICU_UC_LIBS@ @ICU_I18N_LIBS@
|
||||||
LIBS_LIBASS = @LIBASS_LIBS@
|
LIBS_LIBASS = @LIBASS_LIBS@
|
||||||
LIBS_LIBCURL = @LIBCURL_LIBS@
|
|
||||||
LIBS_LIBPULSE = @LIBPULSE_LIBS@
|
LIBS_LIBPULSE = @LIBPULSE_LIBS@
|
||||||
LIBS_LUA = ../vendor/luajit/src/libluajit.a
|
LIBS_LUA = $(TOP)vendor/luajit/src/libluajit.a
|
||||||
LIBS_OPENAL = @OPENAL_LIBS@
|
LIBS_OPENAL = @OPENAL_LIBS@
|
||||||
LIBS_PORTAUDIO = @PORTAUDIO_LIBS@
|
LIBS_PORTAUDIO = @PORTAUDIO_LIBS@
|
||||||
LIBS_PTHREAD = @PTHREAD_LIBS@
|
LIBS_PTHREAD = @PTHREAD_LIBS@
|
||||||
LIBS_UCHARDET ?= ../vendor/universalchardet/libuniversalchardet.a
|
|
||||||
|
|
||||||
ifeq (yes, $(BUILD_DARWIN))
|
ifeq (yes, $(BUILD_DARWIN))
|
||||||
LIBS_LUA = ../vendor/luajit/src/libluajit-aegisub.so
|
LIBS_LUA = $(TOP)vendor/luajit/src/libluajit-aegisub.so
|
||||||
endif
|
endif
|
||||||
|
|
||||||
#####################
|
#####################
|
||||||
# DEBUG / DEVELOPMENT
|
# DEBUG / DEVELOPMENT
|
||||||
#####################
|
#####################
|
||||||
PRECOMPILED_HEADER = @enable_gcc_prec@
|
PRECOMPILED_HEADER = @enable_gcc_prec@
|
||||||
ENABLE_REPORTER = @ENABLE_REPORTER@
|
|
||||||
|
|
||||||
##########
|
##########
|
||||||
# BINARIES
|
# BINARIES
|
||||||
|
@ -141,6 +131,4 @@ BIN_MKDIR = mkdir
|
||||||
BIN_MKDIR_P = mkdir -p
|
BIN_MKDIR_P = mkdir -p
|
||||||
BIN_ECHO = echo
|
BIN_ECHO = echo
|
||||||
BIN_TOUCH = touch
|
BIN_TOUCH = touch
|
||||||
BIN_TAR = tar
|
|
||||||
BIN_GZIP = gzip
|
|
||||||
BIN_WX_CONFIG = @WX_CONFIG_PATH@
|
BIN_WX_CONFIG = @WX_CONFIG_PATH@
|
||||||
|
|
250
Makefile.target
|
@ -1,23 +1,9 @@
|
||||||
# *** THERE ARE NO USER-EDITABLE ITEMS HERE. ***
|
ifneq (yes, $(INCLUDING_CHILD_MAKEFILES))
|
||||||
#
|
COMMANDS := all install clean distclean test depclean osx-bundle osx-dmg
|
||||||
# TODO:
|
.PHONY: $(COMMANDS)
|
||||||
# * Allow variables to be overridden on the CL.
|
|
||||||
|
|
||||||
.PHONY: all install clean subdirs $(SUBDIRS)
|
|
||||||
all: subdirs $(PROGRAM)
|
|
||||||
.DEFAULT_GOAL := all
|
.DEFAULT_GOAL := all
|
||||||
|
|
||||||
ifneq (no, $(BUILD_LIB))
|
# Would be nice to move this somewhere else (Makefile.inc?)
|
||||||
all: $(LIB) $(LIB_SHARED)
|
|
||||||
endif
|
|
||||||
|
|
||||||
OBJ = $(addsuffix .o, $(basename $(SRC)))
|
|
||||||
DEP = $(addsuffix .d, $(basename $(SRC)))
|
|
||||||
|
|
||||||
###################
|
|
||||||
# PLATFORM SPECIFIC
|
|
||||||
###################
|
|
||||||
|
|
||||||
ifeq (yes, $(BUILD_DARWIN))
|
ifeq (yes, $(BUILD_DARWIN))
|
||||||
CFLAGS += -mmacosx-version-min=10.7 -gfull
|
CFLAGS += -mmacosx-version-min=10.7 -gfull
|
||||||
CXXFLAGS += -mmacosx-version-min=10.7 -gfull
|
CXXFLAGS += -mmacosx-version-min=10.7 -gfull
|
||||||
|
@ -25,161 +11,111 @@ LDFLAGS += -mmacosx-version-min=10.7 -Wl,-dead_strip -pagezero_size 10000 -image
|
||||||
LIB_SHARED_LINK = $(LIB_SHARED_LINK_OSX)
|
LIB_SHARED_LINK = $(LIB_SHARED_LINK_OSX)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
LIB_TARGETS := $(addprefix $(TOP)lib/,$(LIB:%=lib%.a))
|
||||||
|
|
||||||
###########
|
# Handle per-target flags in the form foo_CFLAGS := -w by mapping them to all
|
||||||
# LIBRARIES
|
# of the objects a target depends on. This has potentially dumb results if
|
||||||
###########
|
# multiple targets use a single object file, so don't do that.
|
||||||
$(LIB) : $(OBJ)
|
define set_target_flags
|
||||||
$(BIN_AR) cru $@ $(OBJ)
|
OBJ += $($1_OBJ)
|
||||||
$(BIN_RANLIB) $@
|
|
||||||
|
|
||||||
ifdef LIB_SHARED
|
$($1_OBJ): CPPFLAGS := $(CPPFLAGS) $($1_CPPFLAGS)
|
||||||
LIB_SHARED_FULL = $(LIB_SHARED).$(LIB_VERSION)
|
$($1_OBJ): CXXFLAGS := $(CXXFLAGS) $($1_CXXFLAGS)
|
||||||
$(LIB_SHARED) : $(OBJ)
|
$($1_OBJ): OBJCXXFLAGS := $(CXXFLAGS) $($1_CXXFLAGS)
|
||||||
$(BIN_CXX) $(LIB_SHARED_LINK) $(LDFLAGS) $(OBJ) $(LIBS) -o $(LIB_SHARED_FULL)
|
|
||||||
$(BIN_LN) -sf $(LIB_SHARED_FULL) $(LIB_SHARED)
|
|
||||||
|
|
||||||
CLEANFILES+= $(LIB_SHARED_FULL)
|
ifeq (yes, $(PRECOMPILED_HEADER))
|
||||||
|
ifdef $1_PCH
|
||||||
|
CLEANFILES += $($1_PCH).gch
|
||||||
|
$($1_OBJ): CXXFLAGS += -include $($1_PCH) $(PCHFLAGS)
|
||||||
|
$($1_OBJ): $($1_PCH).gch
|
||||||
|
$($1_PCH).gch: $($1_PCH)
|
||||||
|
$($1_PCH).gch: CPPFLAGS := $(CPPFLAGS) $($1_CPPFLAGS)
|
||||||
|
$($1_PCH).gch: CXXFLAGS := $(CXXFLAGS) $($1_CXXFLAGS)
|
||||||
|
else
|
||||||
|
$($1_OBJ): CXXFLAGS += -include acconf.h
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
$($1_OBJ): CXXFLAGS += -include acconf.h
|
||||||
|
endif
|
||||||
|
endef
|
||||||
|
$(foreach target,$(LIB),$(eval $(call set_target_flags,$(target),$(TOP)lib/lib$(target).a)))
|
||||||
|
$(foreach target,$(PROGRAM),$(eval $(call set_target_flags,$(notdir $(target)),$(target))))
|
||||||
|
|
||||||
|
# Create the build and install targets for programs
|
||||||
|
# Not done with a pattern rule since the pattern would be just %: and doing that
|
||||||
|
# leads to make trying to use gcc to make any nonexistent targets rather than
|
||||||
|
# erroring
|
||||||
|
define create_program_targets
|
||||||
|
ifdef $1_INSTALLNAME
|
||||||
|
install: $(DESTDIR)$(P_BINDIR)/$($1_INSTALLNAME)
|
||||||
|
$(DESTDIR)$(P_BINDIR)/$($1_INSTALLNAME): $(dir $2)$($1_INSTALLNAME)
|
||||||
|
@$(BIN_MKDIR) -p $(DESTDIR)$(P_BINDIR)
|
||||||
|
@$(BIN_INSTALL) $(dir $2)$($1_INSTALLNAME) $(DESTDIR)$(P_BINDIR)/$($1_INSTALLNAME)
|
||||||
|
$(dir $2)$($1_INSTALLNAME): $($1_OBJ)
|
||||||
|
$(BIN_CXX) -o $(dir $2)$($1_INSTALLNAME) $(LDFLAGS) $($1_OBJ) $(LIBS) $($1_LIBS)
|
||||||
|
all: $(dir $2)$($1_INSTALLNAME)
|
||||||
|
else
|
||||||
|
$2: $($1_OBJ)
|
||||||
|
$(BIN_CXX) -o $2 $(LDFLAGS) $($1_OBJ) $(LIBS) $($1_LIBS)
|
||||||
|
all: $2
|
||||||
|
endif
|
||||||
|
$(eval CLEANFILES += $(filter-out %/,$2 $(dir $2)$($1_INSTALLNAME)))
|
||||||
|
endef
|
||||||
|
$(foreach target,$(PROGRAM),$(eval $(call create_program_targets,$(notdir $(target)),$(target))))
|
||||||
|
|
||||||
|
# The dependency files which will be automatically generated by gcc.
|
||||||
|
# The filter is due to that libraries also appear in OBJ
|
||||||
|
DEP := $(filter %.d,$(OBJ:%.o=%.d))
|
||||||
|
|
||||||
|
# If the goal is a relative path to a file, convert it to an absolute path
|
||||||
|
ifneq ($(filter-out $(COMMANDS),$(MAKECMDGOALS)),)
|
||||||
|
ABSGOAL := $(abspath $(MAKECMDGOALS))
|
||||||
|
ifneq ($(MAKECMDGOALS),$(ABSGOAL))
|
||||||
|
$(MAKECMDGOALS): $(ABSGOAL) ;
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
##########
|
# Primary build targets
|
||||||
# PROGRAMS
|
all: $(LIB_TARGETS)
|
||||||
##########
|
|
||||||
$(PROGRAM): $(OBJ)
|
|
||||||
$(BIN_CXX) -o $@ $(LDFLAGS) $(OBJ) $(LIBS)
|
|
||||||
|
|
||||||
##########
|
clean:
|
||||||
# CLEANING
|
$(BIN_RM) -f $(OBJ) $(CLEANFILES) $(LIB_TARGETS)
|
||||||
##########
|
|
||||||
clean: $(SUBDIRS)
|
|
||||||
$(BIN_RM) -f $(OBJ) $(CLEANFILES) $(LIB) $(LIB_SHARED) $(PROGRAM)
|
|
||||||
ifdef PRECOMPILED_HEADER_NAME
|
|
||||||
$(BIN_RM) -f $(PRECOMPILED_HEADER_NAME).gch
|
|
||||||
endif
|
|
||||||
|
|
||||||
mostlyclean: $(SUBDIRS)
|
|
||||||
$(BIN_RM) -f $(OBJ) $(CLEANFILES) $(LIB) $(LIB_SHARED) $(PROGRAM)
|
|
||||||
|
|
||||||
distclean: clean
|
distclean: clean
|
||||||
$(BIN_RM) -rf $(DISTCLEANFILES) $(DEP)
|
$(BIN_RM) -rf $(DISTCLEANFILES) $(DEP)
|
||||||
ifdef PRECOMPILED_HEADER_NAME
|
|
||||||
$(BIN_RM) -f $(PRECOMPILED_HEADER_NAME).gch
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
depclean: clean
|
||||||
|
$(BIN_RM) -rf $(DEP)
|
||||||
|
|
||||||
#########
|
install:
|
||||||
# INSTALL
|
|
||||||
#########
|
|
||||||
ifeq (install, $(MAKECMDGOALS))
|
|
||||||
INSTALL_LIB=$(addprefix $(P_LIB)/, $(LIB_SHARED) $(LIB_SHARED_FULL))
|
|
||||||
endif
|
|
||||||
|
|
||||||
BIN_SINSTALL=$(BIN_INSTALL)
|
# The actual build rules
|
||||||
|
|
||||||
install: $(SUBDIRS) install-share install-program install-lib
|
|
||||||
|
|
||||||
install-strip:
|
|
||||||
$(MAKE) BIN_SINSTALL='$(BIN_INSTALL) -s' install
|
|
||||||
|
|
||||||
install-program:
|
|
||||||
ifdef PROGRAM_INSTALL
|
|
||||||
@$(BIN_MKDIR) -p $(DESTDIR)$(P_BINDIR)
|
|
||||||
@$(BIN_SINSTALL) $(PROGRAM) $(DESTDIR)$(P_BINDIR)/$(PROGRAM)
|
|
||||||
endif
|
|
||||||
|
|
||||||
install-lib:
|
|
||||||
ifdef LIB_SHARED_INSTALL
|
|
||||||
$(BIN_MKDIR) -p $(DESTDIR)$(P_LIB)
|
|
||||||
$(BIN_SINSTALL) $(LIB_SHARED_FULL) $(DESTDIR)$(P_LIB)/$(LIB_SHARED_FULL)
|
|
||||||
$(BIN_LN) -sf $(LIB_SHARED_FULL) $(DESTDIR)$(P_LIB)/$(LIB_SHARED)
|
|
||||||
endif
|
|
||||||
|
|
||||||
install-share:
|
|
||||||
ifdef DATA_SHARE
|
|
||||||
@$(BIN_MKDIR) -p $(addprefix $(DESTDIR)$(P_DATA)/, $(dir $(DATA_SHARE)))
|
|
||||||
@for i in $(DATA_SHARE); do \
|
|
||||||
$(BIN_ECHO) "$(BIN_INSTALL) $$i $(DESTDIR)$(P_DATA)/$$i"; \
|
|
||||||
$(BIN_INSTALL) $$i $(DESTDIR)$(P_DATA)/$$i; \
|
|
||||||
done
|
|
||||||
endif
|
|
||||||
ifdef DATA_SHARE_DOC
|
|
||||||
@$(BIN_MKDIR) -p $(addprefix $(DESTDIR)$(P_DOC)/, $(dir $(DATA_SHARE_DOC)))
|
|
||||||
@for i in $(DATA_SHARE_DOC); do \
|
|
||||||
$(BIN_ECHO) "$(BIN_INSTALL) $$i $(DESTDIR)$(P_DOC)/$$i"; \
|
|
||||||
$(BIN_INSTALL) $$i $(DESTDIR)$(P_DOC)/$$i; \
|
|
||||||
done
|
|
||||||
endif
|
|
||||||
|
|
||||||
########################
|
|
||||||
# SUBDIRECTORY TRAVERSAL
|
|
||||||
########################
|
|
||||||
subdirs: $(SUBDIRS)
|
|
||||||
|
|
||||||
$(SUBDIRS):
|
|
||||||
$(MAKE) -C $@ $(MAKECMDGOALS)
|
|
||||||
|
|
||||||
# Set relations to ensure dependencies are built before their targets during parallel builds.
|
|
||||||
automation: libaegisub vendor/luajit
|
|
||||||
src: vendor/universalchardet vendor/luajit tools libaegisub
|
|
||||||
tests: libaegisub
|
|
||||||
tools: libaegisub
|
|
||||||
|
|
||||||
$(OBJ): $(GLOBAL_DEPS)
|
|
||||||
|
|
||||||
OBJCXXFLAGS := $(CXXFLAGS)
|
|
||||||
|
|
||||||
####################
|
|
||||||
# PRECOMPILED HEADER
|
|
||||||
####################
|
|
||||||
ifdef PRECOMPILED_HEADER_NAME
|
|
||||||
ifeq (yes, $(PRECOMPILED_HEADER))
|
|
||||||
CXXFLAGS += -include $(PRECOMPILED_HEADER_NAME) $(PCHFLAGS)
|
|
||||||
# This hack is required until we can use the 'private' keyword (gmake 3.82) to avoid all the
|
|
||||||
# per-object CXXFLAGS being triggered by the ($OBJ) line.
|
|
||||||
CXXFLAGS_GNU_MAKE_SUCKS := $(CXXFLAGS)
|
|
||||||
$(OBJ): | $(PRECOMPILED_HEADER_NAME).gch
|
|
||||||
$(PRECOMPILED_HEADER_NAME).gch: CXXFLAGS = $(CXXFLAGS_GNU_MAKE_SUCKS)
|
|
||||||
$(PRECOMPILED_HEADER_NAME).gch: $(PRECOMPILED_HEADER_NAME)
|
|
||||||
else
|
|
||||||
CXXFLAGS += -include acconf.h
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
|
||||||
########
|
|
||||||
# CCACHE
|
|
||||||
########
|
|
||||||
ifeq (yes, $(CCACHE_ENABLE))
|
|
||||||
CXX_ENV = $(CCACHE_ENV)
|
|
||||||
BIN_CC := ccache $(BIN_CC)
|
|
||||||
BIN_CXX := ccache $(BIN_CXX)
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
|
||||||
##################
|
|
||||||
# TRANSFORM RULES
|
|
||||||
##################
|
|
||||||
.SUFFIXES:
|
.SUFFIXES:
|
||||||
.SUFFIXES: .o .c .cpp .cxx .mm
|
|
||||||
|
|
||||||
%.o: %.c
|
CXX_CMD = $(CXX_ENV) $(BIN_CXX) $(CFLAGS_DEP) $(CPPFLAGS)
|
||||||
$(CXX_ENV) $(BIN_CC) $(CFLAGS_DEP) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
|
CC_CMD = $(CXX_ENV) $(BIN_CC) $(CFLAGS_DEP) $(CPPFLAGS)
|
||||||
|
POST_FLAGS = $($@_FLAGS) -c -o $@ $<
|
||||||
|
|
||||||
%.o: %.cpp
|
%.o: %.c ; $(CC_CMD) $(CFLAGS) $(POST_FLAGS)
|
||||||
$(CXX_ENV) $(BIN_CXX) $(CFLAGS_DEP) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $<
|
%.o: %.cpp ; $(CXX_CMD) $(CXXFLAGS) $(POST_FLAGS)
|
||||||
|
%.o: %.cxx ; $(CXX_CMD) $(CXXFLAGS) $(POST_FLAGS)
|
||||||
|
%.o: %.cc ; $(CXX_CMD) $(CXXFLAGS) $(POST_FLAGS)
|
||||||
|
%.o: %.mm ; $(CXX_CMD) $(OBJCXXFLAGS) $(POST_FLAGS)
|
||||||
|
%.o: %.m ; $(CC_CMD) $(CFLAGS) -fmodules $(POST_FLAGS)
|
||||||
|
|
||||||
%.o: %.cxx
|
%.gch: %
|
||||||
$(CXX_ENV) $(BIN_CXX) $(CFLAGS_DEP) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $<
|
@$(BIN_RM) -f $@
|
||||||
|
|
||||||
%.o: %.cc
|
|
||||||
$(CXX_ENV) $(BIN_CXX) $(CFLAGS_DEP) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $<
|
|
||||||
|
|
||||||
%.o: %.mm
|
|
||||||
$(CXX_ENV) $(BIN_CXX) $(CFLAGS_DEP) $(CPPFLAGS) $(OBJCXXFLAGS) -c -o $@ $<
|
|
||||||
|
|
||||||
$(PRECOMPILED_HEADER_NAME).gch: $(PRECOMPILED_HEADER_NAME)
|
|
||||||
$(CXX_ENV) $(BIN_CXX) $(CPPFLAGS) $(CXXFLAGS) -x c++-header $<
|
$(CXX_ENV) $(BIN_CXX) $(CPPFLAGS) $(CXXFLAGS) -x c++-header $<
|
||||||
|
|
||||||
|
.SECONDEXPANSION:
|
||||||
|
|
||||||
-include ($DEP)
|
# Libraries contain all object files they depend on (but they may depend on other files)
|
||||||
.SUFFIXES:
|
# Not using libtool on OS X because it has an unsilenceable warning about a
|
||||||
|
# compatibility issue with BSD 4.3 (wtf)
|
||||||
|
lib%.a: $$($$*_OBJ)
|
||||||
|
@$(BIN_MKDIR_P) $(dir $@)
|
||||||
|
$(BIN_AR) cru $@ $(filter %.o,$^)
|
||||||
|
$(BIN_RANLIB) $@
|
||||||
|
|
||||||
|
-include $(DEP)
|
||||||
|
endif
|
||||||
|
|
|
@ -1,56 +1,28 @@
|
||||||
include ../Makefile.inc
|
include $(dir $(lastword $(MAKEFILE_LIST)))../header.mk
|
||||||
|
|
||||||
PRECOMPILED_HEADER_NAME = ../libaegisub/lagi_pre.h
|
DATA_AUTOMATION := \
|
||||||
|
$(wildcard $(d)autoload/*) \
|
||||||
|
$(wildcard $(d)demos/*) \
|
||||||
|
$(wildcard $(d)include/*.lua) \
|
||||||
|
$(wildcard $(d)include/aegisub/*)
|
||||||
|
|
||||||
PROGRAM = aegisub-lua
|
DATA_AUTOMATION_REL := $(subst $(d),,$(DATA_AUTOMATION))
|
||||||
|
DATA_AUTOMATION_INSTALLED = $(addprefix $(DESTDIR)$(P_DATA)/automation/, $(DATA_AUTOMATION_REL))
|
||||||
|
|
||||||
CXXFLAGS += -I../libaegisub/include -I../src -I.. $(CXXFLAGS_WX)
|
$(DESTDIR)$(P_DATA)/automation/%: $(d)%
|
||||||
CPPFLAGS += $(CPPFLAGS_BOOST) $(CFLAGS_LUA)
|
$(MKDIR_INSTALL)
|
||||||
|
|
||||||
LIBS := -L../libaegisub -laegisub $(LIBS_LUA) $(LIBS)
|
aegisub-lua_OBJ := $(d)tests/aegisub.o $(TOP)lib/libaegisub.a $(TOP)lib/libluabins.a $(LIBS_LUA)
|
||||||
LIBS += ../vendor/luabins/libluabins.a
|
aegisub-lua_CPPFLAGS := $(CPPFLAGS_BOOST) $(CFLAGS_LUA) -I$(TOP)libaegisub/include -I$(TOP)src $(CXXFLAGS_WX)
|
||||||
LIBS += $(LIBS_WX) $(LIBS_BOOST) $(LIBS_ICU)
|
aegisub-lua_LIBS := $(LIBS_WX) $(LIBS_BOOST) $(LIBS_ICU)
|
||||||
|
|
||||||
SRC += tests/aegisub.cpp
|
PROGRAM += $(d)aegisub-lua
|
||||||
|
|
||||||
test: $(PROGRAM)
|
test-automation: $(PROGRAM)
|
||||||
LUA=./aegisub-lua busted -p 'moon' tests/modules
|
cd $(TOP)automation; LUA=./aegisub-lua busted -p 'moon' tests/modules
|
||||||
|
|
||||||
.PHONY: test
|
test: test-automation
|
||||||
|
|
||||||
# share/
|
install: $(DATA_AUTOMATION_INSTALLED)
|
||||||
DATA_AUTOMATION += \
|
|
||||||
autoload/cleantags-autoload.lua \
|
|
||||||
autoload/kara-templater.lua \
|
|
||||||
autoload/karaoke-auto-leadin.lua \
|
|
||||||
autoload/macro-1-edgeblur.lua \
|
|
||||||
autoload/macro-2-mkfullwitdh.lua \
|
|
||||||
autoload/select-overlaps.moon \
|
|
||||||
autoload/strip-tags.lua \
|
|
||||||
demos/future-windy-blur.lua \
|
|
||||||
demos/raytracer.lua \
|
|
||||||
include/aegisub/clipboard.lua \
|
|
||||||
include/aegisub/re.moon \
|
|
||||||
include/aegisub/unicode.moon \
|
|
||||||
include/aegisub/util.moon \
|
|
||||||
include/cleantags.lua \
|
|
||||||
include/clipboard.lua \
|
|
||||||
include/karaskel-auto4.lua \
|
|
||||||
include/karaskel.lua \
|
|
||||||
include/moonscript.lua \
|
|
||||||
include/re.lua \
|
|
||||||
include/unicode.lua \
|
|
||||||
include/utils-auto4.lua \
|
|
||||||
include/utils.lua
|
|
||||||
|
|
||||||
all: ;
|
include $(TOP)Makefile.target
|
||||||
|
|
||||||
install: install-share
|
|
||||||
@$(BIN_MKDIR) -p $(addprefix $(DESTDIR)$(P_DATA)/automation/, $(dir $(DATA_AUTOMATION)))
|
|
||||||
@for i in $(DATA_AUTOMATION); do \
|
|
||||||
$(BIN_ECHO) "$(BIN_INSTALL) -m644 $$i $(DESTDIR)$(P_DATA)/automation/$$i"; \
|
|
||||||
$(BIN_INSTALL) -m644 $$i $(DESTDIR)$(P_DATA)/automation/$$i; \
|
|
||||||
done
|
|
||||||
|
|
||||||
include ../Makefile.target
|
|
||||||
-include tests/*.d
|
|
||||||
|
|
15
configure.ac
|
@ -13,7 +13,6 @@ m4_define([hunspell_required_version], [1.2.0])
|
||||||
m4_define([icu_required_version], [4.8.1.1])
|
m4_define([icu_required_version], [4.8.1.1])
|
||||||
m4_define([libass_required_version], [0.9.7])
|
m4_define([libass_required_version], [0.9.7])
|
||||||
m4_define([libpulse_required_version], [0.5])
|
m4_define([libpulse_required_version], [0.5])
|
||||||
m4_define([lua_auto4_required_version], [5.1])
|
|
||||||
m4_define([pkgconfig_required_version], [0.20])
|
m4_define([pkgconfig_required_version], [0.20])
|
||||||
m4_define([portaudio_required_version], [19])
|
m4_define([portaudio_required_version], [19])
|
||||||
m4_define([wx_required_version], [3.0.0])
|
m4_define([wx_required_version], [3.0.0])
|
||||||
|
@ -34,22 +33,15 @@ AC_CANONICAL_HOST
|
||||||
###########################
|
###########################
|
||||||
build_darwin="no"
|
build_darwin="no"
|
||||||
build_linux="no"
|
build_linux="no"
|
||||||
build_bsd="no"
|
|
||||||
build_default="no"
|
|
||||||
|
|
||||||
AS_CASE([$host],
|
AS_CASE([$host],
|
||||||
[*-*-darwin*], [build_darwin="yes"],
|
[*-*-darwin*], [build_darwin="yes"],
|
||||||
[*-*-linux*], [build_linux="yes"],
|
[*-*-linux*], [build_linux="yes"])
|
||||||
[*-*-*bsd*], [build_bsd="yes"],
|
|
||||||
[build_default="yes"])
|
|
||||||
|
|
||||||
# Used for universalchardet.
|
# Used for universalchardet.
|
||||||
AC_AGI_MDCPUCFG($host)
|
AC_AGI_MDCPUCFG($host)
|
||||||
|
|
||||||
AC_SUBST(build_bsd)
|
|
||||||
AC_SUBST(build_linux)
|
|
||||||
AC_SUBST(build_darwin)
|
AC_SUBST(build_darwin)
|
||||||
AC_SUBST(build_default)
|
|
||||||
|
|
||||||
########################
|
########################
|
||||||
# Configurable variables
|
# Configurable variables
|
||||||
|
@ -431,10 +423,7 @@ AS_IF([test x$with_agi_cv_wxstc = xno], AC_MSG_FAILURE([wxWidgets StyledTextCtrl
|
||||||
# This turns on some internal (to aegisub) debugging features.
|
# This turns on some internal (to aegisub) debugging features.
|
||||||
# A debug version of wxWidgets is required.
|
# A debug version of wxWidgets is required.
|
||||||
AS_IF([test x$enable_debug = xyes],
|
AS_IF([test x$enable_debug = xyes],
|
||||||
[PACKAGE_DEBUG="-debug"
|
[AS_IF([$WX_CONFIG_PATH --debug],[AC_CXX_FLAG([-D_DEBUG])])])
|
||||||
AS_IF([$WX_CONFIG_PATH --debug],[AC_CXX_FLAG([-D_DEBUG])])])
|
|
||||||
|
|
||||||
AC_SUBST(PACKAGE_DEBUG)
|
|
||||||
|
|
||||||
############################
|
############################
|
||||||
# Precompiled Header Support
|
# Precompiled Header Support
|
||||||
|
|
44
header.mk
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
d := $(abspath $(dir $(lastword $(filter-out $(lastword $(MAKEFILE_LIST)),$(MAKEFILE_LIST)))))/
|
||||||
|
|
||||||
|
ifndef TOP
|
||||||
|
TOP := $(abspath $(dir $(lastword $(MAKEFILE_LIST))))/
|
||||||
|
include $(TOP)Makefile.inc
|
||||||
|
|
||||||
|
subdirs := \
|
||||||
|
automation \
|
||||||
|
libaegisub \
|
||||||
|
packages/desktop \
|
||||||
|
po \
|
||||||
|
src \
|
||||||
|
tests \
|
||||||
|
tools \
|
||||||
|
vendor/luabins \
|
||||||
|
vendor/luajit \
|
||||||
|
vendor/universalchardet
|
||||||
|
|
||||||
|
subdirs := $(addprefix $(TOP),$(addsuffix /Makefile,$(subdirs)))
|
||||||
|
|
||||||
|
INCLUDING_CHILD_MAKEFILES=yes
|
||||||
|
d_save := $d
|
||||||
|
$(foreach dir,$(filter-out $(abspath $(MAKEFILE_LIST)),$(subdirs)), $(eval include $(dir)))
|
||||||
|
d := $(d_save)
|
||||||
|
INCLUDING_CHILD_MAKEFILES=no
|
||||||
|
|
||||||
|
DISTCLEANFILES += \
|
||||||
|
$(TOP)acconf.h \
|
||||||
|
$(TOP)configure \
|
||||||
|
$(TOP)acconf.h.in~ \
|
||||||
|
$(TOP)build/git_version.h \
|
||||||
|
$(TOP)Makefile.inc \
|
||||||
|
$(TOP)config.log \
|
||||||
|
$(TOP)acconf.h.in \
|
||||||
|
$(TOP)config.status \
|
||||||
|
$(TOP)autom4te.cache \
|
||||||
|
$(TOP)aclocal.m4 \
|
||||||
|
|
||||||
|
define MKDIR_INSTALL
|
||||||
|
@$(BIN_MKDIR_P) $(dir $@)
|
||||||
|
$(BIN_INSTALL) -m644 $< $@
|
||||||
|
endef
|
||||||
|
|
||||||
|
endif
|
|
@ -1,67 +1,51 @@
|
||||||
include ../Makefile.inc
|
include $(dir $(lastword $(MAKEFILE_LIST)))../header.mk
|
||||||
|
|
||||||
LIB = libaegisub.a
|
aegisub_OBJ := \
|
||||||
|
$(d)common/parser.o \
|
||||||
CXXFLAGS += -Iinclude -I../src -I.. -fPIC
|
$(d)ass/dialogue_parser.o \
|
||||||
CPPFLAGS += $(CPPFLAGS_BOOST) $(CFLAGS_LUA)
|
$(subst .cpp,.o,$(wildcard $(d)common/cajun/*.cpp)) \
|
||||||
|
$(subst .cpp,.o,$(wildcard $(d)lua/modules/*.cpp)) \
|
||||||
PRECOMPILED_HEADER_NAME = lagi_pre.h
|
$(subst .c,.o,$(wildcard $(d)lua/modules/*.c)) \
|
||||||
lagi_pre.h.gch: CXXFLAGS := $(CXXFLAGS)
|
$(subst .cpp,.o,$(wildcard $(d)lua/*.cpp)) \
|
||||||
|
$(subst .cpp,.o,$(wildcard $(d)unix/*.cpp)) \
|
||||||
common/charset_conv.o: CXXFLAGS += $(CFLAGS_ICONV)
|
$(d)common/calltip_provider.o \
|
||||||
common/parser.o: CXXFLAGS += -ftemplate-depth=256
|
$(d)common/character_count.o \
|
||||||
unix/path.o: CXXFLAGS += -DP_DATA=\"$(P_DATA)\"
|
$(d)common/charset.o \
|
||||||
|
$(d)common/charset_6937.o \
|
||||||
SRC += \
|
$(d)common/charset_conv.o \
|
||||||
common/parser.cpp \
|
$(d)common/color.o \
|
||||||
ass/dialogue_parser.cpp \
|
$(d)common/file_mapping.o \
|
||||||
common/cajun/elements.cpp \
|
$(d)common/format.o \
|
||||||
common/cajun/reader.cpp \
|
$(d)common/fs.o \
|
||||||
common/cajun/writer.cpp \
|
$(d)common/hotkey.o \
|
||||||
common/calltip_provider.cpp \
|
$(d)common/io.o \
|
||||||
common/character_count.cpp \
|
$(d)common/json.o \
|
||||||
common/charset.cpp \
|
$(d)common/kana_table.o \
|
||||||
common/charset_6937.cpp \
|
$(d)common/karaoke_matcher.o \
|
||||||
common/charset_conv.cpp \
|
$(d)common/keyframe.o \
|
||||||
common/color.cpp \
|
$(d)common/log.o \
|
||||||
common/file_mapping.cpp \
|
$(d)common/mru.o \
|
||||||
common/format.cpp \
|
$(d)common/option.o \
|
||||||
common/fs.cpp \
|
$(d)common/option_visit.o \
|
||||||
common/hotkey.cpp \
|
$(d)common/path.o \
|
||||||
common/io.cpp \
|
$(d)common/thesaurus.o \
|
||||||
common/json.cpp \
|
$(d)common/util.o \
|
||||||
common/kana_table.cpp \
|
$(d)common/vfr.o \
|
||||||
common/karaoke_matcher.cpp \
|
$(d)common/ycbcr_conv.o
|
||||||
common/keyframe.cpp \
|
|
||||||
common/log.cpp \
|
|
||||||
common/mru.cpp \
|
|
||||||
common/option.cpp \
|
|
||||||
common/option_visit.cpp \
|
|
||||||
common/path.cpp \
|
|
||||||
common/thesaurus.cpp \
|
|
||||||
common/util.cpp \
|
|
||||||
common/vfr.cpp \
|
|
||||||
common/ycbcr_conv.cpp \
|
|
||||||
lua/modules.cpp \
|
|
||||||
lua/modules/lfs.cpp \
|
|
||||||
lua/modules/lpeg.c \
|
|
||||||
lua/modules/re.cpp \
|
|
||||||
lua/modules/unicode.cpp \
|
|
||||||
lua/script_reader.cpp \
|
|
||||||
lua/utils.cpp \
|
|
||||||
unix/access.cpp \
|
|
||||||
unix/fs.cpp \
|
|
||||||
unix/log.cpp \
|
|
||||||
unix/path.cpp \
|
|
||||||
unix/util.cpp
|
|
||||||
|
|
||||||
ifeq (yes, $(BUILD_DARWIN))
|
ifeq (yes, $(BUILD_DARWIN))
|
||||||
SRC += osx/util.mm osx/dispatch.mm osx/spellchecker.mm
|
aegisub_OBJ += $(subst .mm,.o,$(wildcard $(d)osx/*.mm))
|
||||||
else
|
else
|
||||||
SRC += common/dispatch.cpp
|
aegisub_OBJ += $(d)common/dispatch.o
|
||||||
endif
|
endif
|
||||||
|
|
||||||
include ../Makefile.target
|
aegisub_PCH := $(d)lagi_pre.h
|
||||||
-include */*.d
|
aegisub_CPPFLAGS := -I$(d)include -I$(TOP) -fPIC $(CPPFLAGS_BOOST) $(CFLAGS_LUA)
|
||||||
-include lua/*/*.d
|
|
||||||
-include common/*/*.d
|
$(d)common/charset_conv.o_FLAGS := $(CFLAGS_ICONV)
|
||||||
|
$(d)common/parser.o_FLAGS := -ftemplate-depth=256
|
||||||
|
$(d)unix/path.o_FLAGS := -DP_DATA=\"$(P_DATA)\"
|
||||||
|
|
||||||
|
LIB += aegisub
|
||||||
|
|
||||||
|
include $(TOP)Makefile.target
|
||||||
|
|
Before Width: | Height: | Size: 895 B After Width: | Height: | Size: 895 B |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
|
@ -1,47 +1,26 @@
|
||||||
include ../../Makefile.inc
|
include $(dir $(lastword $(MAKEFILE_LIST)))../../header.mk
|
||||||
|
DESKTOP_SRC := $(d)
|
||||||
|
|
||||||
applicationsdir = $(DESKTOP_DATADIR)/applications
|
ICONS = $(wildcard $(d)*.png) $(wildcard $(d)*.svg)
|
||||||
applications_DATA = aegisub.desktop
|
ICONS_INSTALLED = $(DESTDIR)$(P_ICON)/hicolor/%/aegisub.
|
||||||
|
|
||||||
iconsscalabledir = $(DESKTOP_DATADIR)/icons/hicolor/scalable/apps
|
DESKTOP_FILE := $(d)aegisub.desktop
|
||||||
iconsscalable_DATA = scalable/aegisub.svg
|
DESKTOP_FILE_PO := $(d)../../po
|
||||||
|
DESKTOP_FILE_INSTALLED = $(DESTDIR)$(P_DESKTOP)/$(notdir $(DESKTOP_FILE))
|
||||||
|
|
||||||
aegisub.desktop: aegisub.desktop.template ../../po
|
DISTCLEANFILES += $(DESKTOP_FILE)
|
||||||
intltool-merge --quiet --desktop-style ../../po aegisub.desktop.template aegisub.desktop
|
|
||||||
|
|
||||||
all: ;
|
%.desktop: %.desktop.template $(DESKTOP_FILE_PO)
|
||||||
|
intltool-merge --quiet --desktop-style $(DESKTOP_FILE_PO) $< $@
|
||||||
|
|
||||||
ICON_HICOLOR = \
|
$(ICONS_INSTALLED)png: $(d)%.png ; $(MKDIR_INSTALL)
|
||||||
16x16/apps/aegisub.png \
|
$(ICONS_INSTALLED)svg: $(d)%.svg ; $(MKDIR_INSTALL)
|
||||||
22x22/apps/aegisub.png \
|
$(DESKTOP_FILE_INSTALLED): $(DESKTOP_FILE) ; $(MKDIR_INSTALL)
|
||||||
24x24/apps/aegisub.png \
|
|
||||||
32x32/apps/aegisub.png \
|
|
||||||
48x48/apps/aegisub.png \
|
|
||||||
64x64/apps/aegisub.png
|
|
||||||
|
|
||||||
ICON_SCALABLE = \
|
ifneq (yes, $(BUILD_DARWIN))
|
||||||
scalable/apps/aegisub.svg
|
install: \
|
||||||
|
$(DESKTOP_FILE_INSTALLED) \
|
||||||
|
$(patsubst %.png, $(ICONS_INSTALLED)png, $(patsubst %.svg, $(ICONS_INSTALLED)svg, $(notdir $(ICONS))))
|
||||||
|
endif
|
||||||
|
|
||||||
DESKTOP_FILE = aegisub.desktop
|
include $(TOP)Makefile.target
|
||||||
|
|
||||||
install: install-desktop install-icons
|
|
||||||
|
|
||||||
install-desktop: $(DESKTOP_FILE)
|
|
||||||
@$(BIN_MKDIR) -p $(DESTDIR)$(P_DESKTOP)
|
|
||||||
$(BIN_INSTALL) $(DESKTOP_FILE) $(DESTDIR)$(P_DESKTOP)/$(DESKTOP_FILE)
|
|
||||||
|
|
||||||
|
|
||||||
install-icons:
|
|
||||||
@$(BIN_MKDIR) -p $(addprefix $(DESTDIR)$(P_ICON)/hicolor/, $(dir $(ICON_HICOLOR)))
|
|
||||||
@for i in $(ICON_HICOLOR); do \
|
|
||||||
$(BIN_ECHO) "$(BIN_INSTALL) -m644 $$i $(DESTDIR)$(P_ICON)/hicolor/$$i"; \
|
|
||||||
$(BIN_INSTALL) -m644 $$i $(DESTDIR)$(P_ICON)/hicolor/$$i; \
|
|
||||||
done
|
|
||||||
$(BIN_TOUCH) $(DESTDIR)$(P_ICON)/hicolor
|
|
||||||
$(BIN_MKDIR) -p $(DESTDIR)$(P_ICON)/hicolor/scalable/apps
|
|
||||||
$(BIN_CP) $(ICON_SCALABLE) $(DESTDIR)$(P_ICON)/hicolor/$(ICON_SCALABLE)
|
|
||||||
|
|
||||||
|
|
||||||
DISTCLEANFILES = aegisub.desktop
|
|
||||||
|
|
||||||
include ../../Makefile.target
|
|
||||||
|
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
54
po/Makefile
|
@ -1,52 +1,24 @@
|
||||||
include ../Makefile.inc
|
include $(dir $(lastword $(MAKEFILE_LIST)))../header.mk
|
||||||
|
|
||||||
.SUFFIXES: .po .mo
|
.SUFFIXES: .po .mo
|
||||||
|
|
||||||
PO = \
|
PO := $(wildcard $(d)*.po)
|
||||||
ar.po \
|
MO := $(PO:po=mo)
|
||||||
bg.po \
|
|
||||||
ca.po \
|
|
||||||
cs.po \
|
|
||||||
da.po \
|
|
||||||
de.po \
|
|
||||||
el.po \
|
|
||||||
es.po \
|
|
||||||
eu.po \
|
|
||||||
fa.po \
|
|
||||||
fi.po \
|
|
||||||
fr_FR.po \
|
|
||||||
gl.po \
|
|
||||||
hu.po \
|
|
||||||
id.po \
|
|
||||||
it.po \
|
|
||||||
ja.po \
|
|
||||||
ko.po \
|
|
||||||
nl.po \
|
|
||||||
pl.po \
|
|
||||||
pt_BR.po \
|
|
||||||
pt_PT.po \
|
|
||||||
ru.po \
|
|
||||||
sr_RS.po \
|
|
||||||
sr_RS@latin.po \
|
|
||||||
vi.po \
|
|
||||||
zh_CN.po \
|
|
||||||
zh_TW.po
|
|
||||||
|
|
||||||
MO = $(addsuffix .mo, $(basename $(PO)))
|
ifeq (yes, $(BUILD_DARWIN))
|
||||||
|
MO_INSTALLED = $(DESTDIR)$(P_LOCALE)/%.lproj/$(AEGISUB_CATALOG).mo
|
||||||
all: $(MO)
|
else
|
||||||
|
MO_INSTALLED = $(DESTDIR)$(P_LOCALE)/%/LC_MESSAGES/$(AEGISUB_CATALOG).mo
|
||||||
|
endif
|
||||||
|
|
||||||
%.mo: %.po
|
%.mo: %.po
|
||||||
$(BIN_MSGFMT) -o $@ $<
|
$(BIN_MSGFMT) -o $@ $<
|
||||||
|
|
||||||
install:
|
$(MO_INSTALLED): $(d)%.mo ; $(MKDIR_INSTALL)
|
||||||
@$(BIN_MKDIR) -p $(addsuffix /LC_MESSAGES/, $(addprefix $(DESTDIR)$(P_LOCALE)/, $(basename $(PO))))
|
|
||||||
@for i in $(basename $(PO)); do \
|
|
||||||
$(BIN_ECHO) "$(BIN_INSTALL) -m644 $$i.mo $(DESTDIR)$(P_LOCALE)/$$i/LC_MESSAGES/$(AEGISUB_CATALOG).mo"; \
|
|
||||||
$(BIN_INSTALL) -m644 $$i.mo $(DESTDIR)$(P_LOCALE)/$$i/LC_MESSAGES/$(AEGISUB_CATALOG).mo; \
|
|
||||||
done
|
|
||||||
|
|
||||||
|
all: $(MO)
|
||||||
|
install: $(patsubst %.mo, $(MO_INSTALLED), $(notdir $(MO)))
|
||||||
|
|
||||||
CLEANFILES = $(MO)
|
CLEANFILES += $(MO)
|
||||||
|
|
||||||
include ../Makefile.target
|
include $(TOP)Makefile.target
|
||||||
|
|
396
src/Makefile
|
@ -1,271 +1,207 @@
|
||||||
include ../Makefile.inc
|
include $(dir $(lastword $(MAKEFILE_LIST)))../header.mk
|
||||||
|
|
||||||
PROGRAM = $(AEGISUB_COMMAND)
|
PROGRAM += $(d)src
|
||||||
PROGRAM_INSTALL = yes
|
|
||||||
|
|
||||||
PRECOMPILED_HEADER_NAME=agi_pre.h
|
src_CPPFLAGS := -I$(d) -I.. -I$(d)include -I$(TOP)libaegisub/include -I$(TOP)build \
|
||||||
|
$(CFLAGS_PTHREAD) $(CFLAGS_FFTW3) $(CFLAGS_ICU)
|
||||||
|
src_CXXFLAGS := -D__STDC_FORMAT_MACROS $(CXXFLAGS_WX)
|
||||||
|
src_LIBS := $(LIBS_GL) $(LIBS_PTHREAD) $(LIBS_WX) $(LIBS_FREETYPE) \
|
||||||
|
$(LIBS_LIBASS) $(LIBS_FONTCONFIG) $(LIBS_FFTW3) $(LIBS_BOOST) $(LIBS_ICU)
|
||||||
|
src_PCH := $(d)agi_pre.h
|
||||||
|
src_INSTALLNAME := $(AEGISUB_COMMAND)
|
||||||
|
|
||||||
AEGISUB_CFLAGS = -I. -I.. -Iinclude -I../libaegisub/include -I../build -DAEGISUB $(CFLAGS_PTHREAD) $(CFLAGS_FFTW3) $(CFLAGS_ICU)
|
src_OBJ := \
|
||||||
|
$(subst .cpp,.o,$(wildcard $(d)command/*.cpp)) \
|
||||||
CFLAGS += $(AEGISUB_CFLAGS)
|
$(subst .cpp,.o,$(wildcard $(d)dialog_*.cpp)) \
|
||||||
CXXFLAGS += $(AEGISUB_CFLAGS) -D__STDC_FORMAT_MACROS $(CXXFLAGS_WX)
|
$(subst .cpp,.o,$(wildcard $(d)subtitle_format*.cpp)) \
|
||||||
|
$(subst .cpp,.o,$(wildcard $(d)visual_tool*.cpp)) \
|
||||||
LIBS := -L../libaegisub -laegisub $(LIBS_LUA) $(LIBS)
|
$(d)MatroskaParser.o \
|
||||||
LIBS += $(LIBS_GL) $(LIBS_PTHREAD) $(LIBS_WX) $(LIBS_FREETYPE)
|
$(d)aegisublocale.o \
|
||||||
LIBS += $(LIBS_FONTCONFIG) $(LIBS_FFTW3) $(LIBS_UCHARDET) $(LIBS_BOOST)
|
$(d)ass_attachment.o \
|
||||||
LIBS += $(LIBS_ICU) ../vendor/luabins/libluabins.a
|
$(d)ass_dialogue.o \
|
||||||
|
$(d)ass_entry.o \
|
||||||
|
$(d)ass_export_filter.o \
|
||||||
|
$(d)ass_exporter.o \
|
||||||
|
$(d)ass_file.o \
|
||||||
|
$(d)ass_karaoke.o \
|
||||||
|
$(d)ass_override.o \
|
||||||
|
$(d)ass_parser.o \
|
||||||
|
$(d)ass_style.o \
|
||||||
|
$(d)ass_style_storage.o \
|
||||||
|
$(d)ass_time.o \
|
||||||
|
$(d)async_video_provider.o \
|
||||||
|
$(d)audio_box.o \
|
||||||
|
$(d)audio_colorscheme.o \
|
||||||
|
$(d)audio_controller.o \
|
||||||
|
$(d)audio_display.o \
|
||||||
|
$(d)audio_karaoke.o \
|
||||||
|
$(d)audio_marker.o \
|
||||||
|
$(d)audio_player.o \
|
||||||
|
$(d)audio_provider.o \
|
||||||
|
$(d)audio_provider_convert.o \
|
||||||
|
$(d)audio_provider_dummy.o \
|
||||||
|
$(d)audio_provider_hd.o \
|
||||||
|
$(d)audio_provider_lock.o \
|
||||||
|
$(d)audio_provider_pcm.o \
|
||||||
|
$(d)audio_provider_ram.o \
|
||||||
|
$(d)audio_renderer.o \
|
||||||
|
$(d)audio_renderer_spectrum.o \
|
||||||
|
$(d)audio_renderer_waveform.o \
|
||||||
|
$(d)audio_timing_dialogue.o \
|
||||||
|
$(d)audio_timing_karaoke.o \
|
||||||
|
$(d)auto4_base.o \
|
||||||
|
$(d)auto4_lua.o \
|
||||||
|
$(d)auto4_lua_assfile.o \
|
||||||
|
$(d)auto4_lua_dialog.o \
|
||||||
|
$(d)auto4_lua_progresssink.o \
|
||||||
|
$(d)avisynth_wrap.o \
|
||||||
|
$(d)base_grid.o \
|
||||||
|
$(d)charset_detect.o \
|
||||||
|
$(d)colorspace.o \
|
||||||
|
$(d)colour_button.o \
|
||||||
|
$(d)compat.o \
|
||||||
|
$(d)context.o \
|
||||||
|
$(d)crash_writer.o \
|
||||||
|
$(d)export_fixstyle.o \
|
||||||
|
$(d)export_framerate.o \
|
||||||
|
$(d)fft.o \
|
||||||
|
$(d)font_file_lister.o \
|
||||||
|
$(d)font_file_lister_fontconfig.o \
|
||||||
|
$(d)frame_main.o \
|
||||||
|
$(d)gl_text.o \
|
||||||
|
$(d)gl_wrap.o \
|
||||||
|
$(d)grid_column.o \
|
||||||
|
$(d)help_button.o \
|
||||||
|
$(d)hotkey.o \
|
||||||
|
$(d)hotkey_data_view_model.o \
|
||||||
|
$(d)initial_line_state.o \
|
||||||
|
$(d)main.o \
|
||||||
|
$(d)menu.o \
|
||||||
|
$(d)mkv_wrap.o \
|
||||||
|
$(d)pen.o \
|
||||||
|
$(d)persist_location.o \
|
||||||
|
$(d)preferences.o \
|
||||||
|
$(d)preferences_base.o \
|
||||||
|
$(d)project.o \
|
||||||
|
$(d)resolution_resampler.o \
|
||||||
|
$(d)search_replace_engine.o \
|
||||||
|
$(d)selection_controller.o \
|
||||||
|
$(d)spellchecker.o \
|
||||||
|
$(d)spline.o \
|
||||||
|
$(d)spline_curve.o \
|
||||||
|
$(d)string_codec.o \
|
||||||
|
$(d)subs_controller.o \
|
||||||
|
$(d)subs_edit_box.o \
|
||||||
|
$(d)subs_edit_ctrl.o \
|
||||||
|
$(d)subs_preview.o \
|
||||||
|
$(d)subtitles_provider.o \
|
||||||
|
$(d)subtitles_provider_libass.o \
|
||||||
|
$(d)text_file_reader.o \
|
||||||
|
$(d)text_file_writer.o \
|
||||||
|
$(d)text_selection_controller.o \
|
||||||
|
$(d)thesaurus.o \
|
||||||
|
$(d)timeedit_ctrl.o \
|
||||||
|
$(d)toggle_bitmap.o \
|
||||||
|
$(d)toolbar.o \
|
||||||
|
$(d)tooltip_manager.o \
|
||||||
|
$(d)utils.o \
|
||||||
|
$(d)validators.o \
|
||||||
|
$(d)vector2d.o \
|
||||||
|
$(d)version.o \
|
||||||
|
$(d)video_box.o \
|
||||||
|
$(d)video_controller.o \
|
||||||
|
$(d)video_display.o \
|
||||||
|
$(d)video_frame.o \
|
||||||
|
$(d)video_out_gl.o \
|
||||||
|
$(d)video_provider_cache.o \
|
||||||
|
$(d)video_provider_dummy.o \
|
||||||
|
$(d)video_provider_manager.o \
|
||||||
|
$(d)video_provider_yuv4mpeg.o \
|
||||||
|
$(d)video_slider.o \
|
||||||
|
$(d)visual_feature.o \
|
||||||
|
$(LIBS_LUA) \
|
||||||
|
$(TOP)lib/libaegisub.a \
|
||||||
|
$(TOP)lib/libluabins.a \
|
||||||
|
$(TOP)lib/libresrc.a \
|
||||||
|
$(TOP)lib/libuniversalchardet.a \
|
||||||
|
|
||||||
ifeq (yes, $(BUILD_DARWIN))
|
ifeq (yes, $(BUILD_DARWIN))
|
||||||
SRC += osx/osx_utils.mm osx/retina_helper.mm osx/scintilla_ime.mm
|
src_OBJ += $(subst .mm,.o,$(wildcard $(d)osx/*.mm))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
lpeg.o: CXXFLAGS += -Wno-unused-function
|
|
||||||
MatroskaParser.o: CFLAGS += -Wno-sometimes-uninitialized
|
|
||||||
|
|
||||||
###############
|
###############
|
||||||
# AUDIO PLAYERS
|
# AUDIO PLAYERS
|
||||||
###############
|
###############
|
||||||
|
$(d)audio_player_alsa.o_FLAGS := $(CFLAGS_ALSA)
|
||||||
|
$(d)audio_player_portaudio.o_FLAGS := $(CFLAGS_PORTAUDIO)
|
||||||
|
$(d)audio_player_pulse.o_FLAGS := $(CFLAGS_LIBPULSE)
|
||||||
|
$(d)audio_player_openal.o_FLAGS := $(CFLAGS_OPENAL)
|
||||||
|
$(d)audio_player_oss.o_FLAGS := $(CFLAGS_OSS)
|
||||||
|
|
||||||
ifeq (yes, $(HAVE_ALSA))
|
ifeq (yes, $(HAVE_ALSA))
|
||||||
audio_player_alsa.o: CXXFLAGS += $(CFLAGS_ALSA)
|
src_LIBS += $(LIBS_ALSA)
|
||||||
LIBS += $(LIBS_ALSA)
|
src_OBJ += $(d)audio_player_alsa.o
|
||||||
SRC += audio_player_alsa.cpp
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq (yes, $(HAVE_PORTAUDIO))
|
ifeq (yes, $(HAVE_PORTAUDIO))
|
||||||
audio_player_portaudio.o: CXXFLAGS += $(CFLAGS_PORTAUDIO)
|
src_LIBS += $(LIBS_PORTAUDIO)
|
||||||
LIBS += $(LIBS_PORTAUDIO)
|
src_OBJ += $(d)audio_player_portaudio.o
|
||||||
SRC += audio_player_portaudio.cpp
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq (yes, $(HAVE_LIBPULSE))
|
ifeq (yes, $(HAVE_LIBPULSE))
|
||||||
audio_player_pulse.o: CXXFLAGS += $(CFLAGS_LIBPULSE)
|
src_LIBS += $(LIBS_LIBPULSE)
|
||||||
LIBS += $(LIBS_LIBPULSE)
|
src_OBJ += $(d)audio_player_pulse.o
|
||||||
SRC += audio_player_pulse.cpp
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq (yes, $(HAVE_OPENAL))
|
ifeq (yes, $(HAVE_OPENAL))
|
||||||
audio_player_openal.o: CXXFLAGS += $(CFLAGS_OPENAL)
|
src_LIBS += $(LIBS_OPENAL)
|
||||||
LIBS += $(LIBS_OPENAL)
|
src_OBJ += $(d)audio_player_openal.o
|
||||||
SRC += audio_player_openal.cpp
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq (yes, $(HAVE_OSS))
|
ifeq (yes, $(HAVE_OSS))
|
||||||
audio_player_oss.o: CXXFLAGS += $(CFLAGS_OSS)
|
src_OBJ += $(d)audio_player_oss.o
|
||||||
SRC += audio_player_oss.cpp
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
#######################
|
#######################
|
||||||
# AUDIO / VIDEO SUPPORT
|
# AUDIO / VIDEO SUPPORT
|
||||||
#######################
|
#######################
|
||||||
ifeq (yes, $(HAVE_FFMS2))
|
ifeq (yes, $(HAVE_FFMS2))
|
||||||
audio_provider_ffmpegsource.o video_provider_ffmpegsource.o ffmpegsource_common.o preferences.o: \
|
$(d)audio_provider_ffmpegsource.o_FLAGS := $(CFLAGS_FFMS2)
|
||||||
CXXFLAGS += $(CFLAGS_FFMS2)
|
$(d)video_provider_ffmpegsource.o_FLAGS := $(CFLAGS_FFMS2)
|
||||||
LIBS += $(LIBS_FFMS2)
|
$(d)ffmpegsource_common.o_FLAGS := $(CFLAGS_FFMS2)
|
||||||
SRC += audio_provider_ffmpegsource.cpp video_provider_ffmpegsource.cpp ffmpegsource_common.cpp
|
$(d)preferences.o_FLAGS := $(CFLAGS_FFMS2)
|
||||||
|
src_LIBS += $(LIBS_FFMS2)
|
||||||
|
src_OBJ += \
|
||||||
|
$(d)audio_provider_ffmpegsource.o \
|
||||||
|
$(d)video_provider_ffmpegsource.o \
|
||||||
|
$(d)ffmpegsource_common.o
|
||||||
endif
|
endif
|
||||||
|
|
||||||
###########
|
|
||||||
# SUBTITLES
|
|
||||||
###########
|
|
||||||
subtitles_provider_libass.o: CXXFLAGS += $(CFLAGS_LIBASS) -Wno-c++11-narrowing
|
|
||||||
subtitles_provider.o: CXXFLAGS += $(CFLAGS_LIBASS)
|
|
||||||
LIBS += $(LIBS_LIBASS)
|
|
||||||
SRC += subtitles_provider_libass.cpp
|
|
||||||
|
|
||||||
##############
|
##############
|
||||||
# MISCELLANOUS
|
# MISCELLANOUS
|
||||||
##############
|
##############
|
||||||
ifeq (yes, $(HAVE_HUNSPELL))
|
ifeq (yes, $(HAVE_HUNSPELL))
|
||||||
spellchecker_hunspell.o: CXXFLAGS += $(CFLAGS_HUNSPELL)
|
$(d)spellchecker_hunspell.o_FLAGS := $(CFLAGS_HUNSPELL)
|
||||||
LIBS += $(LIBS_HUNSPELL)
|
src_LIBS += $(LIBS_HUNSPELL)
|
||||||
SRC += spellchecker_hunspell.cpp
|
src_OBJ += $(d)spellchecker_hunspell.o
|
||||||
endif
|
endif
|
||||||
|
|
||||||
#####################
|
#####################
|
||||||
# SOURCE-LEVEL CFLAGS
|
# SOURCE-LEVEL CFLAGS
|
||||||
#####################
|
#####################
|
||||||
audio_player.o: CXXFLAGS += $(CFLAGS_ALSA) $(CFLAGS_PORTAUDIO) $(CFLAGS_LIBPULSE) $(CFLAGS_OPENAL)
|
$(d)MatroskaParser.o_FLAGS := -Wno-sometimes-uninitialized
|
||||||
audio_provider.o: CXXFLAGS += $(CFLAGS_FFMS2)
|
$(d)audio_player.o_FLAGS := $(CFLAGS_ALSA) $(CFLAGS_PORTAUDIO) $(CFLAGS_LIBPULSE) $(CFLAGS_OPENAL)
|
||||||
auto4_base.o: CXXFLAGS += $(CFLAGS_FREETYPE)
|
$(d)audio_provider.o_FLAGS := $(CFLAGS_FFMS2)
|
||||||
charset_detect.o: CXXFLAGS += -D_X86_
|
$(d)auto4_base.o_FLAGS := $(CFLAGS_FREETYPE)
|
||||||
font_file_lister_fontconfig.o: CXXFLAGS += $(CFLAGS_FONTCONFIG)
|
$(d)charset_detect.o_FLAGS := -D_X86_
|
||||||
text_file_reader.o: CXXFLAGS += -D_X86_
|
$(d)font_file_lister_fontconfig.o_FLAGS := $(CFLAGS_FONTCONFIG)
|
||||||
video_provider_manager.o: CXXFLAGS += $(CFLAGS_FFMS2)
|
$(d)subtitles_provider.o_FLAGS := $(CFLAGS_LIBASS)
|
||||||
auto4_lua.o auto4_lua_assfile.o auto4_lua_dialog.o auto4_lua_progresssink.o: CPPFLAGS += -I../vendor/luajit/include
|
$(d)subtitles_provider_libass.o_FLAGS := $(CFLAGS_LIBASS) -Wno-c++11-narrowing
|
||||||
|
$(d)text_file_reader.o_FLAGS := -D_X86_
|
||||||
|
$(d)video_provider_manager.o_FLAGS := $(CFLAGS_FFMS2)
|
||||||
|
$(d)auto4_lua.o_FLAGS := -I$(TOP)vendor/luajit/include
|
||||||
|
$(d)auto4_lua_assfile.o_FLAGS := -I$(TOP)vendor/luajit/include
|
||||||
|
$(d)auto4_lua_dialog.o_FLAGS := -I$(TOP)vendor/luajit/include
|
||||||
|
$(d)auto4_lua_progresssink.o_FLAGS := -I$(TOP)vendor/luajit/include
|
||||||
|
|
||||||
SRC += \
|
include $(d)libresrc/Makefile
|
||||||
MatroskaParser.c \
|
|
||||||
aegisublocale.cpp \
|
|
||||||
ass_attachment.cpp \
|
|
||||||
ass_dialogue.cpp \
|
|
||||||
ass_entry.cpp \
|
|
||||||
ass_export_filter.cpp \
|
|
||||||
ass_exporter.cpp \
|
|
||||||
ass_file.cpp \
|
|
||||||
ass_karaoke.cpp \
|
|
||||||
ass_override.cpp \
|
|
||||||
ass_parser.cpp \
|
|
||||||
ass_style.cpp \
|
|
||||||
ass_style_storage.cpp \
|
|
||||||
ass_time.cpp \
|
|
||||||
async_video_provider.cpp \
|
|
||||||
audio_box.cpp \
|
|
||||||
audio_colorscheme.cpp \
|
|
||||||
audio_controller.cpp \
|
|
||||||
audio_display.cpp \
|
|
||||||
audio_karaoke.cpp \
|
|
||||||
audio_marker.cpp \
|
|
||||||
audio_player.cpp \
|
|
||||||
audio_provider.cpp \
|
|
||||||
audio_provider_convert.cpp \
|
|
||||||
audio_provider_dummy.cpp \
|
|
||||||
audio_provider_hd.cpp \
|
|
||||||
audio_provider_lock.cpp \
|
|
||||||
audio_provider_pcm.cpp \
|
|
||||||
audio_provider_ram.cpp \
|
|
||||||
audio_renderer.cpp \
|
|
||||||
audio_renderer_spectrum.cpp \
|
|
||||||
audio_renderer_waveform.cpp \
|
|
||||||
audio_timing_dialogue.cpp \
|
|
||||||
audio_timing_karaoke.cpp \
|
|
||||||
auto4_base.cpp \
|
|
||||||
auto4_lua.cpp \
|
|
||||||
auto4_lua_assfile.cpp \
|
|
||||||
auto4_lua_dialog.cpp \
|
|
||||||
auto4_lua_progresssink.cpp \
|
|
||||||
avisynth_wrap.cpp \
|
|
||||||
base_grid.cpp \
|
|
||||||
charset_detect.cpp \
|
|
||||||
colorspace.cpp \
|
|
||||||
colour_button.cpp \
|
|
||||||
command/app.cpp \
|
|
||||||
command/audio.cpp \
|
|
||||||
command/automation.cpp \
|
|
||||||
command/command.cpp \
|
|
||||||
command/edit.cpp \
|
|
||||||
command/grid.cpp \
|
|
||||||
command/help.cpp \
|
|
||||||
command/keyframe.cpp \
|
|
||||||
command/recent.cpp \
|
|
||||||
command/subtitle.cpp \
|
|
||||||
command/time.cpp \
|
|
||||||
command/timecode.cpp \
|
|
||||||
command/tool.cpp \
|
|
||||||
command/video.cpp \
|
|
||||||
command/vis_tool.cpp \
|
|
||||||
compat.cpp \
|
|
||||||
context.cpp \
|
|
||||||
crash_writer.cpp \
|
|
||||||
dialog_about.cpp \
|
|
||||||
dialog_attachments.cpp \
|
|
||||||
dialog_automation.cpp \
|
|
||||||
dialog_autosave.cpp \
|
|
||||||
dialog_colorpicker.cpp \
|
|
||||||
dialog_detached_video.cpp \
|
|
||||||
dialog_dummy_video.cpp \
|
|
||||||
dialog_export.cpp \
|
|
||||||
dialog_export_ebu3264.cpp \
|
|
||||||
dialog_fonts_collector.cpp \
|
|
||||||
dialog_jumpto.cpp \
|
|
||||||
dialog_kara_timing_copy.cpp \
|
|
||||||
dialog_log.cpp \
|
|
||||||
dialog_paste_over.cpp \
|
|
||||||
dialog_progress.cpp \
|
|
||||||
dialog_properties.cpp \
|
|
||||||
dialog_resample.cpp \
|
|
||||||
dialog_search_replace.cpp \
|
|
||||||
dialog_selected_choices.cpp \
|
|
||||||
dialog_selection.cpp \
|
|
||||||
dialog_shift_times.cpp \
|
|
||||||
dialog_spellchecker.cpp \
|
|
||||||
dialog_style_editor.cpp \
|
|
||||||
dialog_style_manager.cpp \
|
|
||||||
dialog_styling_assistant.cpp \
|
|
||||||
dialog_text_import.cpp \
|
|
||||||
dialog_timing_processor.cpp \
|
|
||||||
dialog_translation.cpp \
|
|
||||||
dialog_version_check.cpp \
|
|
||||||
dialog_video_details.cpp \
|
|
||||||
dialog_video_properties.cpp \
|
|
||||||
export_fixstyle.cpp \
|
|
||||||
export_framerate.cpp \
|
|
||||||
fft.cpp \
|
|
||||||
font_file_lister.cpp \
|
|
||||||
font_file_lister_fontconfig.cpp \
|
|
||||||
frame_main.cpp \
|
|
||||||
gl_text.cpp \
|
|
||||||
gl_wrap.cpp \
|
|
||||||
grid_column.cpp \
|
|
||||||
help_button.cpp \
|
|
||||||
hotkey.cpp \
|
|
||||||
hotkey_data_view_model.cpp \
|
|
||||||
initial_line_state.cpp \
|
|
||||||
main.cpp \
|
|
||||||
menu.cpp \
|
|
||||||
mkv_wrap.cpp \
|
|
||||||
pen.cpp \
|
|
||||||
persist_location.cpp \
|
|
||||||
preferences.cpp \
|
|
||||||
preferences_base.cpp \
|
|
||||||
project.cpp \
|
|
||||||
resolution_resampler.cpp \
|
|
||||||
search_replace_engine.cpp \
|
|
||||||
selection_controller.cpp \
|
|
||||||
spellchecker.cpp \
|
|
||||||
spline.cpp \
|
|
||||||
spline_curve.cpp \
|
|
||||||
string_codec.cpp \
|
|
||||||
subs_controller.cpp \
|
|
||||||
subs_edit_box.cpp \
|
|
||||||
subs_edit_ctrl.cpp \
|
|
||||||
subs_preview.cpp \
|
|
||||||
subtitle_format.cpp \
|
|
||||||
subtitle_format_ass.cpp \
|
|
||||||
subtitle_format_ebu3264.cpp \
|
|
||||||
subtitle_format_encore.cpp \
|
|
||||||
subtitle_format_microdvd.cpp \
|
|
||||||
subtitle_format_mkv.cpp \
|
|
||||||
subtitle_format_srt.cpp \
|
|
||||||
subtitle_format_ssa.cpp \
|
|
||||||
subtitle_format_transtation.cpp \
|
|
||||||
subtitle_format_ttxt.cpp \
|
|
||||||
subtitle_format_txt.cpp \
|
|
||||||
subtitles_provider.cpp \
|
|
||||||
text_file_reader.cpp \
|
|
||||||
text_file_writer.cpp \
|
|
||||||
text_selection_controller.cpp \
|
|
||||||
thesaurus.cpp \
|
|
||||||
timeedit_ctrl.cpp \
|
|
||||||
toggle_bitmap.cpp \
|
|
||||||
toolbar.cpp \
|
|
||||||
tooltip_manager.cpp \
|
|
||||||
utils.cpp \
|
|
||||||
validators.cpp \
|
|
||||||
vector2d.cpp \
|
|
||||||
version.cpp \
|
|
||||||
video_box.cpp \
|
|
||||||
video_controller.cpp \
|
|
||||||
video_display.cpp \
|
|
||||||
video_frame.cpp \
|
|
||||||
video_out_gl.cpp \
|
|
||||||
video_provider_cache.cpp \
|
|
||||||
video_provider_dummy.cpp \
|
|
||||||
video_provider_manager.cpp \
|
|
||||||
video_provider_yuv4mpeg.cpp \
|
|
||||||
video_slider.cpp \
|
|
||||||
visual_feature.cpp \
|
|
||||||
visual_tool.cpp \
|
|
||||||
visual_tool_clip.cpp \
|
|
||||||
visual_tool_cross.cpp \
|
|
||||||
visual_tool_drag.cpp \
|
|
||||||
visual_tool_rotatexy.cpp \
|
|
||||||
visual_tool_rotatez.cpp \
|
|
||||||
visual_tool_scale.cpp \
|
|
||||||
visual_tool_vector_clip.cpp
|
|
||||||
|
|
||||||
include libresrc/Makefile.inc
|
|
||||||
|
|
||||||
include ../Makefile.target
|
|
||||||
-include *.d
|
|
||||||
-include command/*.d
|
|
||||||
-include libresrc/*.d
|
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
|
class wxWindow;
|
||||||
namespace agi { namespace charset { class IconvWrapper; } }
|
namespace agi { namespace charset { class IconvWrapper; } }
|
||||||
|
|
||||||
#pragma pack(push, 1)
|
#pragma pack(push, 1)
|
||||||
|
|
34
src/libresrc/Makefile
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
include $(dir $(lastword $(MAKEFILE_LIST)))../../header.mk
|
||||||
|
|
||||||
|
LIB += resrc
|
||||||
|
|
||||||
|
resrc_CPPFLAGS := -I$(TOP) -I$(d) $(CPPFLAGS_WX)
|
||||||
|
resrc_OBJ := \
|
||||||
|
$(d)bitmap.o \
|
||||||
|
$(d)default_config.o \
|
||||||
|
$(d)libresrc.o
|
||||||
|
|
||||||
|
$(resrc_OBJ): $(d)default_config.h $(d)bitmap.h
|
||||||
|
|
||||||
|
RESPACK := cd $(TOP)src/libresrc; $(TOP)vendor/luajit/src/host/minilua $(TOP)tools/respack.lua
|
||||||
|
|
||||||
|
$(d)bitmap.cpp $(d)bitmap.h: $(TOP)tools/respack.lua $(d)../bitmaps/button
|
||||||
|
$(RESPACK) ../bitmaps/manifest.respack bitmap.cpp bitmap.h
|
||||||
|
|
||||||
|
ifeq (yes, $(BUILD_DARWIN))
|
||||||
|
$(d)default_config.cpp $(d)default_config.h: $(TOP)tools/respack.lua $(d)*.json $(d)osx/*.json
|
||||||
|
$(RESPACK) manifest_osx.respack default_config.cpp default_config.h
|
||||||
|
else
|
||||||
|
$(d)default_config.cpp $(d)default_config.h: $(TOP)tools/respack.lua $(d)*.json
|
||||||
|
$(RESPACK) manifest.respack default_config.cpp default_config.h
|
||||||
|
endif
|
||||||
|
|
||||||
|
CLEANFILES += \
|
||||||
|
$(d)bitmap.cpp \
|
||||||
|
$(d)bitmap.h \
|
||||||
|
$(d)default_config.cpp \
|
||||||
|
$(d)default_config.h
|
||||||
|
|
||||||
|
DISTCLEANFILES += $(d)default_config_platform.json
|
||||||
|
|
||||||
|
include $(TOP)Makefile.target
|
|
@ -1,26 +0,0 @@
|
||||||
SRC += \
|
|
||||||
libresrc/bitmap.cpp \
|
|
||||||
libresrc/default_config.cpp \
|
|
||||||
libresrc/libresrc.cpp
|
|
||||||
|
|
||||||
libresrc/bitmap.cpp libresrc/bitmap.h: ../tools/respack.lua bitmaps/button/*
|
|
||||||
../tools/respack.lua bitmaps/manifest.respack libresrc/bitmap.cpp libresrc/bitmap.h
|
|
||||||
|
|
||||||
ifeq (yes, $(BUILD_DARWIN))
|
|
||||||
libresrc/default_config.cpp libresrc/default_config.h: ../tools/respack.lua libresrc/*.json libresrc/osx/*.json
|
|
||||||
../tools/respack.lua libresrc/manifest_osx.respack libresrc/default_config.cpp libresrc/default_config.h
|
|
||||||
else
|
|
||||||
libresrc/default_config.cpp libresrc/default_config.h: ../tools/respack.lua libresrc/*.json
|
|
||||||
../tools/respack.lua libresrc/manifest.respack libresrc/default_config.cpp libresrc/default_config.h
|
|
||||||
endif
|
|
||||||
|
|
||||||
CLEANFILES += \
|
|
||||||
libresrc/bitmap.cpp \
|
|
||||||
libresrc/bitmap.h \
|
|
||||||
libresrc/default_config.cpp \
|
|
||||||
libresrc/default_config.h
|
|
||||||
|
|
||||||
DISTCLEANFILES += default_config_platform.json
|
|
||||||
|
|
||||||
GLOBAL_DEPS += libresrc/bitmap.h libresrc/default_config.h
|
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||||
// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
|
||||||
|
#include <cstdlib>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
#include "bitmap.h"
|
#include "bitmap.h"
|
||||||
|
|
|
@ -44,6 +44,10 @@
|
||||||
#include <wx/menu.h>
|
#include <wx/menu.h>
|
||||||
#include <wx/menuitem.h>
|
#include <wx/menuitem.h>
|
||||||
|
|
||||||
|
#ifdef __WXMAC__
|
||||||
|
#include <wx/app.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
/// Window ID of first menu item
|
/// Window ID of first menu item
|
||||||
static const int MENU_ID_BASE = 10000;
|
static const int MENU_ID_BASE = 10000;
|
||||||
|
|
|
@ -38,6 +38,7 @@
|
||||||
#include <libaegisub/line_wrap.h>
|
#include <libaegisub/line_wrap.h>
|
||||||
|
|
||||||
#include <boost/algorithm/string/replace.hpp>
|
#include <boost/algorithm/string/replace.hpp>
|
||||||
|
#include <wx/utils.h>
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,52 +1,37 @@
|
||||||
include ../Makefile.inc
|
include $(dir $(lastword $(MAKEFILE_LIST)))../header.mk
|
||||||
|
|
||||||
GTEST_ROOT = ../vendor/googletest
|
GTEST_ROOT ?= $(TOP)vendor/googletest
|
||||||
|
GTEST_FILE := ${GTEST_ROOT}/src/gtest-all
|
||||||
|
|
||||||
PROGRAM = run
|
run_PCH := $(d)support/tests_pre.h
|
||||||
|
run_CPPFLAGS := -I$(TOP)libaegisub/include -I$(TOP) -I$(d)support \
|
||||||
|
-I$(GTEST_ROOT) -I$(GTEST_ROOT)/include $(CPPFLAGS_BOOST) $(CFLAGS_LUA)
|
||||||
|
run_CXXFLAGS := -Wno-unused-value -Wno-sign-compare
|
||||||
|
run_LIBS := $(LIBS_BOOST) $(LIBS_ICU)
|
||||||
|
run_OBJ := \
|
||||||
|
$(subst .cpp,.o,$(wildcard $(d)tests/*.cpp)) \
|
||||||
|
$(d)support/main.o \
|
||||||
|
$(d)support/util.o \
|
||||||
|
$(d)support/util_unix.o \
|
||||||
|
$(TOP)lib/libaegisub.a \
|
||||||
|
$(TOP)lib/libuniversalchardet.a \
|
||||||
|
$(GTEST_FILE).o
|
||||||
|
|
||||||
LIBS += -L../libaegisub -laegisub -L../vendor/universalchardet -luniversalchardet $(LIBS_BOOST) $(LIBS_ICU)
|
# This bit of goofiness is to make it only try to build the tests if google
|
||||||
LDFLAGS += -Wl,-rpath $(CURDIR)/../libaegisub $(LDFLAGS_ICONV)
|
# test can be found and silently skip it if not, by using $(wildcard) to check
|
||||||
|
# for file existence
|
||||||
CPPFLAGS += -I../src/include -I../libaegisub/include $(CFLAGS_ICONV) -I${GTEST_ROOT} -I${GTEST_ROOT}/include -I./support $(CPPFLAGS_BOOST)
|
PROGRAM += $(subst $(GTEST_FILE).cc,$(d)run,$(wildcard $(GTEST_FILE).cc))
|
||||||
CXXFLAGS += -Wno-unused-value -Wno-sign-compare
|
|
||||||
|
|
||||||
PRECOMPILED_HEADER_NAME = ../libaegisub/lagi_pre.h
|
|
||||||
|
|
||||||
ifeq (yes, $(BUILD_DARWIN))
|
ifeq (yes, $(BUILD_DARWIN))
|
||||||
LDFLAGS += -framework ApplicationServices -framework Foundation
|
run_LIBS += -framework ApplicationServices -framework Foundation
|
||||||
endif
|
endif
|
||||||
|
|
||||||
SRC = \
|
$(d)data: $(d)setup.sh
|
||||||
support/main.cpp \
|
cd $(TOP)tests; ./setup.sh
|
||||||
support/util.cpp \
|
|
||||||
support/util_unix.cpp \
|
|
||||||
tests/access.cpp \
|
|
||||||
tests/cajun.cpp \
|
|
||||||
tests/color.cpp \
|
|
||||||
tests/dialogue_lexer.cpp \
|
|
||||||
tests/format.cpp \
|
|
||||||
tests/fs.cpp \
|
|
||||||
tests/hotkey.cpp \
|
|
||||||
tests/iconv.cpp \
|
|
||||||
tests/ifind.cpp \
|
|
||||||
tests/karaoke_matcher.cpp \
|
|
||||||
tests/keyframe.cpp \
|
|
||||||
tests/line_iterator.cpp \
|
|
||||||
tests/line_wrap.cpp \
|
|
||||||
tests/mru.cpp \
|
|
||||||
tests/option.cpp \
|
|
||||||
tests/path.cpp \
|
|
||||||
tests/signals.cpp \
|
|
||||||
tests/syntax_highlight.cpp \
|
|
||||||
tests/thesaurus.cpp \
|
|
||||||
tests/util.cpp \
|
|
||||||
tests/uuencode.cpp \
|
|
||||||
tests/vfr.cpp \
|
|
||||||
tests/word_split.cpp \
|
|
||||||
${GTEST_ROOT}/src/gtest-all.cc
|
|
||||||
|
|
||||||
HEADER = support/*.h tests/*.h
|
test-libaegisub: $(d)run $(d)data
|
||||||
|
cd $(TOP)tests; ./run
|
||||||
|
|
||||||
include ../Makefile.target
|
test: $(subst $(GTEST_FILE).cc,test-libaegisub,$(wildcard $(GTEST_FILE).cc))
|
||||||
-include support/*.d
|
|
||||||
-include tests/*.d
|
include $(TOP)Makefile.target
|
||||||
|
|
1
tests/support/tests_pre.h
Normal file
|
@ -0,0 +1 @@
|
||||||
|
#include "../../libaegisub/lagi_pre.h"
|
|
@ -1,16 +1,17 @@
|
||||||
include ../Makefile.inc
|
include $(dir $(lastword $(MAKEFILE_LIST)))../header.mk
|
||||||
|
|
||||||
|
osx-bundle-restart-helper_OBJ := $(d)osx-bundle-restart-helper.o
|
||||||
|
|
||||||
ifeq (yes, $(BUILD_DARWIN))
|
ifeq (yes, $(BUILD_DARWIN))
|
||||||
osx-bundle-restart-helper: osx-bundle-restart-helper.m
|
PROGRAM += $(d)osx-bundle-restart-helper
|
||||||
$(BIN_CC) -o osx-bundle-restart-helper -fmodules osx-bundle-restart-helper.m
|
|
||||||
CLEANFILES += osx-bundle-restart-helper
|
|
||||||
all: osx-bundle-restart-helper
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CXXFLAGS += -I../libaegisub/include $(CFLAGS_ICU)
|
repack-thes-dict_OBJ := $(d)repack-thes-dict.o $(TOP)lib/libaegisub.a
|
||||||
LIBS := -L../libaegisub -laegisub $(LIBS) $(LIBS_BOOST) $(LIBS_ICU)
|
repack-thes-dict_LIBS := $(LIBS_BOOST) $(LIBS_ICU)
|
||||||
|
repack-thes-dict_CPPFLAGS := -I$(TOP) -I$(TOP)libaegisub/include $(CFLAGS_ICU)
|
||||||
|
|
||||||
repack-thes-dict: repack-thes-dict.cpp
|
PROGRAM += $(d)repack-thes-dict
|
||||||
$(BIN_CXX) -o repack-thes-dict repack-thes-dict.cpp $(CXXFLAGS) $(LIBS)
|
|
||||||
|
|
||||||
include ../Makefile.target
|
$(TOP)tools/respack.lua: $(TOP)vendor/luajit/src/host/minilua
|
||||||
|
|
||||||
|
include $(TOP)Makefile.target
|
||||||
|
|
|
@ -9,10 +9,6 @@ SRCDIR=`pwd`
|
||||||
HOME_DIR=`echo ~`
|
HOME_DIR=`echo ~`
|
||||||
WX_PREFIX=`${2} --prefix`
|
WX_PREFIX=`${2} --prefix`
|
||||||
|
|
||||||
if test -z "${CC}"; then
|
|
||||||
CC="cc"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if ! test -d packages/osx_bundle; then
|
if ! test -d packages/osx_bundle; then
|
||||||
echo
|
echo
|
||||||
echo "Make sure you're in the toplevel source directory"
|
echo "Make sure you're in the toplevel source directory"
|
||||||
|
@ -43,6 +39,7 @@ if ! test -f "tools/osx-bundle.sed"; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# used by osx-bundle.sed
|
||||||
find po -name *.po | sed 's/.*\/\(.*\)\.po/ <string>\1<\/string>/; s/RS/YU/' > languages
|
find po -name *.po | sed 's/.*\/\(.*\)\.po/ <string>\1<\/string>/; s/RS/YU/' > languages
|
||||||
|
|
||||||
find ${SKEL_DIR} -type f -not -regex ".*.svn.*"
|
find ${SKEL_DIR} -type f -not -regex ".*.svn.*"
|
||||||
|
@ -54,6 +51,15 @@ cat ${SKEL_DIR}/Contents/Info.plist | sed -f tools/osx-bundle.sed > "${PKG_DIR}/
|
||||||
|
|
||||||
rm languages
|
rm languages
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "---- Installing files ----"
|
||||||
|
make install \
|
||||||
|
DESTDIR="${PKG_DIR}/Contents" \
|
||||||
|
P_DATA="/SharedSupport" \
|
||||||
|
P_DOC="/SharedSupport/doc" \
|
||||||
|
P_LOCALE="/Resources" \
|
||||||
|
P_BINDIR="/MacOS"
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "---- Copying dictionaries ----"
|
echo "---- Copying dictionaries ----"
|
||||||
if test -z "${DICT_DIR}"; then
|
if test -z "${DICT_DIR}"; then
|
||||||
|
@ -67,31 +73,15 @@ else
|
||||||
echo " where the *.aff and *.dic files can be found"
|
echo " where the *.aff and *.dic files can be found"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
echo
|
|
||||||
echo "---- Copying automation/ files ----"
|
|
||||||
pushd automation
|
|
||||||
make install DESTDIR="../${PKG_DIR}/Contents/SharedSupport" P_DATA="" P_DOC="/doc"
|
|
||||||
popd
|
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "---- Copying Aegisub locale files ----"
|
echo "---- Copying Aegisub locale files ----"
|
||||||
# Let Aqua know that aegisub supports english. English strings are
|
# Let Aqua know that aegisub supports english. English strings are
|
||||||
# internal so we don't need an aegisub.mo file.
|
# internal so we don't need an aegisub.mo file.
|
||||||
mkdir -vp "${PKG_DIR}/Contents/Resources/en.lproj"
|
mkdir -vp "${PKG_DIR}/Contents/Resources/en.lproj"
|
||||||
|
|
||||||
for i in `ls -1 po/*.mo|sed "s|po/\(.*\).mo|\1|"`; do
|
# 10.8 wants sr_YU rather than sr_RS
|
||||||
# The only serbian locale 10.8 has is sr_YU
|
mv "${PKG_DIR}/Contents/Resources/sr_RS.lproj" "${PKG_DIR}/Contents/Resources/sr_YU.lproj"
|
||||||
destname=$(echo ${i} | sed 's/sr_RS/sr_YU/')
|
mv "${PKG_DIR}/Contents/Resources/sr_RS@latin.lproj" "${PKG_DIR}/Contents/Resources/sr_YU@latin.lproj"
|
||||||
if test -f "po/${i}.mo"; then
|
|
||||||
mkdir -p "${PKG_DIR}/Contents/Resources/${destname}.lproj"
|
|
||||||
cp -v po/${i}.mo "${PKG_DIR}/Contents/Resources/${destname}.lproj/aegisub.mo"
|
|
||||||
else
|
|
||||||
echo "${i}.mo not found!"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "---- Copying WX locale files ----"
|
echo "---- Copying WX locale files ----"
|
||||||
|
@ -111,16 +101,6 @@ for i in `ls -1 po/*.mo|sed "s|po/\(.*\).mo|\1|"`; do
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
echo
|
|
||||||
echo " ---- Copying binary ----"
|
|
||||||
cp -v src/${AEGISUB_BIN} "${PKG_DIR}/Contents/MacOS/aegisub"
|
|
||||||
|
|
||||||
|
|
||||||
echo
|
|
||||||
echo " ---- Build / install restart-helper ----"
|
|
||||||
cp -v tools/osx-bundle-restart-helper "${PKG_DIR}/Contents/MacOS/restart-helper"
|
|
||||||
|
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "---- Libraries ----"
|
echo "---- Libraries ----"
|
||||||
python tools/osx-fix-libs.py "${PKG_DIR}/Contents/MacOS/aegisub" || exit $?
|
python tools/osx-fix-libs.py "${PKG_DIR}/Contents/MacOS/aegisub" || exit $?
|
||||||
|
|
|
@ -24,13 +24,14 @@
|
||||||
#include <boost/phoenix/core/argument.hpp>
|
#include <boost/phoenix/core/argument.hpp>
|
||||||
#include <boost/phoenix/operator/comparison.hpp>
|
#include <boost/phoenix/operator/comparison.hpp>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
#include <sstream>
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
using boost::phoenix::placeholders::_1;
|
using boost::phoenix::placeholders::_1;
|
||||||
|
|
||||||
void convert(std::string const& path) {
|
void convert(std::string const& path) {
|
||||||
std::unique_ptr<std::ifstream> idx(agi::io::Open(path + ".idx"));
|
std::unique_ptr<std::istream> idx(agi::io::Open(path + ".idx"));
|
||||||
std::unique_ptr<std::ifstream> dat(agi::io::Open(path + ".dat"));
|
std::unique_ptr<std::istream> dat(agi::io::Open(path + ".dat"));
|
||||||
|
|
||||||
std::ostringstream idx_out_buffer;
|
std::ostringstream idx_out_buffer;
|
||||||
agi::io::Save idx_out(path + ".out.idx");
|
agi::io::Save idx_out(path + ".out.idx");
|
||||||
|
|
|
@ -37,8 +37,7 @@ local manifest = try_open(arg[1], 'r')
|
||||||
local out_cpp = try_open(arg[2], 'w')
|
local out_cpp = try_open(arg[2], 'w')
|
||||||
local out_h = try_open(arg[3], 'w')
|
local out_h = try_open(arg[3], 'w')
|
||||||
|
|
||||||
local pos = arg[1]:find('/')
|
local path = arg[1]:match'(.*/).*' or ''
|
||||||
local path = pos and arg[1]:sub(1, pos) or ''
|
|
||||||
|
|
||||||
out_cpp:write('#include "libresrc.h"\n')
|
out_cpp:write('#include "libresrc.h"\n')
|
||||||
|
|
||||||
|
|
19
vendor/luabins/Makefile
vendored
|
@ -1,17 +1,8 @@
|
||||||
include ../../Makefile.inc
|
include $(dir $(lastword $(MAKEFILE_LIST)))../../header.mk
|
||||||
|
|
||||||
LIB = libluabins.a
|
luabins_OBJ := $(subst .c,.o,$(wildcard $(d)src/*.c))
|
||||||
|
luabins_CPPFLAGS := $(CFLAGS_LUA)
|
||||||
|
|
||||||
CPPFLAGS += -I../luajit/include
|
LIB += luabins
|
||||||
|
|
||||||
SRC = \
|
include $(TOP)Makefile.target
|
||||||
src/fwrite.c \
|
|
||||||
src/load.c \
|
|
||||||
src/luabins.c \
|
|
||||||
src/luainternals.c \
|
|
||||||
src/save.c \
|
|
||||||
src/savebuffer.c \
|
|
||||||
src/write.c
|
|
||||||
|
|
||||||
include ../../Makefile.target
|
|
||||||
-include src/*.d
|
|
||||||
|
|
32
vendor/luabins/src/lualess.c
vendored
|
@ -1,32 +0,0 @@
|
||||||
/*
|
|
||||||
* lualess.h
|
|
||||||
* Lua-related definitions for lua-less builds (based on Lua manual)
|
|
||||||
* See copyright notice in luabins.h
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
/*
|
|
||||||
* lua_Alloc-compatible allocator to use in Lua-less applications
|
|
||||||
* with lbs_SaveBuffer. Based on sample code from Lua 5.1 manual.
|
|
||||||
*/
|
|
||||||
void * lbs_simplealloc(
|
|
||||||
void * ud,
|
|
||||||
void * ptr,
|
|
||||||
size_t osize,
|
|
||||||
size_t nsize
|
|
||||||
)
|
|
||||||
{
|
|
||||||
(void) ud;
|
|
||||||
(void) osize; /* not used */
|
|
||||||
|
|
||||||
if (nsize == 0)
|
|
||||||
{
|
|
||||||
free(ptr);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return realloc(ptr, nsize);
|
|
||||||
}
|
|
||||||
}
|
|
19
vendor/luajit/Makefile
vendored
|
@ -1,12 +1,15 @@
|
||||||
default all:
|
include $(dir $(lastword $(MAKEFILE_LIST)))../../header.mk
|
||||||
$(MAKE) -C src amalg
|
|
||||||
|
|
||||||
clean:
|
LUAJIT_DIR := $(abspath $(d)src)
|
||||||
$(MAKE) -C src clean
|
|
||||||
|
|
||||||
distclean:
|
$(LIBS_LUA): $(LUAJIT_DIR)/host/minilua
|
||||||
$(MAKE) -C src clean
|
$(MAKE) -C $(LUAJIT_DIR) amalg
|
||||||
|
|
||||||
install:
|
$(LUAJIT_DIR)/host/minilua:
|
||||||
|
$(MAKE) -C $(LUAJIT_DIR) host/minilua
|
||||||
|
|
||||||
.PHONY: all clean install
|
clean-luajit:
|
||||||
|
$(MAKE) -C $(LUAJIT_DIR) clean
|
||||||
|
|
||||||
|
clean: clean-luajit
|
||||||
|
distclean: clean-luajit
|
||||||
|
|
38
vendor/universalchardet/Makefile
vendored
|
@ -1,36 +1,8 @@
|
||||||
include ../../Makefile.inc
|
include $(dir $(lastword $(MAKEFILE_LIST)))../../header.mk
|
||||||
|
|
||||||
LIB = libuniversalchardet.a
|
universalchardet_OBJ := $(subst .cpp,.o,$(wildcard $(d)*.cpp))
|
||||||
|
universalchardet_CPPFLAGS := -D_X86_
|
||||||
|
|
||||||
CXXFLAGS += -D_X86_
|
LIB += universalchardet
|
||||||
|
|
||||||
SRC = \
|
|
||||||
CharDistribution.cpp \
|
|
||||||
JpCntx.cpp \
|
|
||||||
LangBulgarianModel.cpp \
|
|
||||||
LangCyrillicModel.cpp \
|
|
||||||
LangGreekModel.cpp \
|
|
||||||
LangHebrewModel.cpp \
|
|
||||||
LangHungarianModel.cpp \
|
|
||||||
LangThaiModel.cpp \
|
|
||||||
nsBig5Prober.cpp \
|
|
||||||
nsCharSetProber.cpp \
|
|
||||||
nsEUCJPProber.cpp \
|
|
||||||
nsEUCKRProber.cpp \
|
|
||||||
nsEUCTWProber.cpp \
|
|
||||||
nsEscCharsetProber.cpp \
|
|
||||||
nsEscSM.cpp \
|
|
||||||
nsGB2312Prober.cpp \
|
|
||||||
nsHebrewProber.cpp \
|
|
||||||
nsLatin1Prober.cpp \
|
|
||||||
nsMBCSGroupProber.cpp \
|
|
||||||
nsMBCSSM.cpp \
|
|
||||||
nsSBCSGroupProber.cpp \
|
|
||||||
nsSBCharSetProber.cpp \
|
|
||||||
nsSJISProber.cpp \
|
|
||||||
nsUTF8Prober.cpp \
|
|
||||||
nsUniversalDetector.cpp
|
|
||||||
|
|
||||||
include ../../Makefile.target
|
|
||||||
-include *.d
|
|
||||||
|
|
||||||
|
include $(TOP)Makefile.target
|
||||||
|
|