diff --git a/aegisub/Makefile.target b/aegisub/Makefile.target index acc7d260f..906a64964 100644 --- a/aegisub/Makefile.target +++ b/aegisub/Makefile.target @@ -6,6 +6,7 @@ .PHONY: all install clean subdirs $(SUBDIRS) all: subdirs $(LIB) $(LIB_SHARED) $(PROGRAM) +.DEFAULT_GOAL := all OBJ = $(addsuffix .o, $(basename $(SRC))) DEP = $(addsuffix .d, $(basename $(SRC))) @@ -124,9 +125,8 @@ $(SUBDIRS): src: universalchardet tools libaegisub tests: libaegisub reporter: src -command: libresrc - +$(OBJ): $(GLOBAL_DEPS) #################### # PRECOMPILED HEADER diff --git a/aegisub/src/Makefile b/aegisub/src/Makefile index f962e0c96..6c26731a4 100644 --- a/aegisub/src/Makefile +++ b/aegisub/src/Makefile @@ -5,15 +5,13 @@ PROGRAM_INSTALL = yes PRECOMPILED_HEADER_NAME=agi_pre.h -SUBDIRS = command libresrc - CXXFLAGS += -DAEGISUB -D__STDC_FORMAT_MACROS -I. -I.. -Iinclude -I../libaegisub/include $(CFLAGS_PTHREAD) $(CPPFLAGS_WX) $(CFLAGS_FFTW3) LDFLAGS += -L../libaegisub -laegisub-3.0 LDFLAGS += $(CFLAGS_DEBUG) $(CFLAGS_PROFILE) $(LDFLAGS_CCMALLOC) LDFLAGS += $(LDFLAGS_EFENCE) $(LDFLAGS_GL) $(LDFLAGS_PTHREAD) $(LDFLAGS_WX) LDFLAGS += $(LDFLAGS_FREETYPE) $(LDFLAGS_FONTCONFIG) $(LDFLAGS_FFTW3) -LDFLAGS_POST += libresrc/libresrc.a $(LDFLAGS_UCHARDET) command/aegisub_command.a +LDFLAGS_POST += $(LDFLAGS_UCHARDET) ifdef BUILD_DARWIN LDFLAGS += -lz @@ -275,5 +273,8 @@ EXTRA_DIST= \ bitmaps/windows/eyedropper.cur \ bitmaps/windows/icon.ico +include command/Makefile.inc +include libresrc/Makefile.inc + include ../Makefile.target -include *.d diff --git a/aegisub/src/command/Makefile b/aegisub/src/command/Makefile deleted file mode 100644 index ac51f1e05..000000000 --- a/aegisub/src/command/Makefile +++ /dev/null @@ -1,35 +0,0 @@ -include ../../Makefile.inc - -CXXFLAGS += -I../../ -I.. -I. -I../../libaegisub/include -I../include -DAEGISUB -D__STDC_FORMAT_MACROS - -CXXFLAGS += $(CFLAGS_WX) -PRECOMPILED_HEADER_NAME=../agi_pre.h - -icon.o: CXXFLAGS += -fno-var-tracking - -LIB = aegisub_command.a - -SRC = \ - app.cpp \ - audio.cpp \ - automation.cpp \ - edit.cpp \ - grid.cpp \ - help.cpp \ - keyframe.cpp \ - recent.cpp \ - subtitle.cpp \ - time.cpp \ - timecode.cpp \ - tool.cpp \ - video.cpp \ - vis_tool.cpp - -SRC += \ - icon.cpp \ - command.cpp - -HEADER = *.h - -include ../../Makefile.target --include *.d diff --git a/aegisub/src/command/Makefile.inc b/aegisub/src/command/Makefile.inc new file mode 100644 index 000000000..28e1bccb5 --- /dev/null +++ b/aegisub/src/command/Makefile.inc @@ -0,0 +1,23 @@ +command/icon.o: CXXFLAGS += -fno-var-tracking + +SRC += \ + command/app.cpp \ + command/audio.cpp \ + command/automation.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 + +SRC += \ + command/icon.cpp \ + command/command.cpp + +HEADER += *.h diff --git a/aegisub/src/libresrc/Makefile b/aegisub/src/libresrc/Makefile deleted file mode 100644 index 4d50bdb08..000000000 --- a/aegisub/src/libresrc/Makefile +++ /dev/null @@ -1,32 +0,0 @@ -include ../../Makefile.inc - -LIB = libresrc.a - -CPPFLAGS = $(CPPFLAGS_WX) - -SRC = \ - bitmap.cpp \ - default_config.cpp \ - libresrc.cpp - -HEADER= \ - libresrc.h - -all: bitmap.cpp default_config.cpp - -bitmap.cpp: ../../tools/common-respack - ../../tools/common-respack ../bitmaps/manifest.respack bitmap.cpp bitmap.h - -default_config.cpp: ../../tools/common-respack *.json - ../../tools/common-respack manifest.respack default_config.cpp default_config.h - -EXTRA_DIST = *.json - -CLEANFILES= \ - bitmap.cpp \ - bitmap.h \ - default_config.cpp \ - default_config.h - -include ../../Makefile.target --include *.d diff --git a/aegisub/src/libresrc/Makefile.inc b/aegisub/src/libresrc/Makefile.inc new file mode 100644 index 000000000..b0ff52a1e --- /dev/null +++ b/aegisub/src/libresrc/Makefile.inc @@ -0,0 +1,21 @@ +SRC += \ + libresrc/bitmap.cpp \ + libresrc/default_config.cpp \ + libresrc/libresrc.cpp + +HEADER += \ + libresrc/libresrc.h + +libresrc/bitmap.cpp libresrc/bitmap.h: ../tools/common-respack + ../tools/common-respack bitmaps/manifest.respack libresrc/bitmap.cpp libresrc/bitmap.h + +libresrc/default_config.cpp libresrc/default_config.h: ../tools/common-respack + ../tools/common-respack libresrc/manifest.respack libresrc/default_config.cpp libresrc/default_config.h + +CLEANFILES += \ + libresrc/bitmap.cpp \ + libresrc/bitmap.h \ + libresrc/default_config.cpp \ + libresrc/default_config.h + +GLOBAL_DEPS = libresrc/bitmap.h libresrc/default_config.h