Use non-recursive make for libresrc and command so that dependencies can actually be set correctly. Fixes parallel builds.

Originally committed to SVN as r6071.
This commit is contained in:
Thomas Goyne 2011-12-22 21:20:34 +00:00
parent 7161b74be0
commit 8796a605ba
6 changed files with 50 additions and 72 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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