diff options
author | konablend <[email protected]> | 2009-03-10 07:05:42 +0000 |
---|---|---|
committer | konablend <[email protected]> | 2009-03-10 07:05:42 +0000 |
commit | e4f62edf63f41d9fd7c63d1a22cb05810a58d003 (patch) | |
tree | 22a19f402be88867743848fe6bd22e76a3a4c194 /libhb | |
parent | 218f59c3137eff2359c80a95e3407488bf01f2d1 (diff) |
BuildSystem: initial _skeleton_ asm support for libhb.
- asm disposition is DISABLED.
- it can only be enabled via a hidden configure option (--enable-asm) but will only be useful once asm code is checked-in.
- this is checked-in early to not lose some internal configure enhancements made during asm build support impl.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2251 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb')
-rw-r--r-- | libhb/module.defs | 29 | ||||
-rw-r--r-- | libhb/module.rules | 17 |
2 files changed, 43 insertions, 3 deletions
diff --git a/libhb/module.defs b/libhb/module.defs index 9853a1027..77a13a02f 100644 --- a/libhb/module.defs +++ b/libhb/module.defs @@ -29,8 +29,6 @@ LIBHB.out += $(LIBHB.c.o) LIBHB.out += $(LIBHB.h.out) LIBHB.out += $(LIBHB.a) -BUILD.out += $(LIBHB.out) - ############################################################################### LIBHB.GCC.D += __LIBHB__ USE_PTHREAD @@ -50,3 +48,30 @@ endif ifneq (,$(filter $(BUILD.arch),ppc ppc64)) LIBHB.GCC.D += WORDS_BIGENDIAN endif + +############################################################################### + +## when defined this gives us the subdir name, or flavor of asm implementation +ifneq (disabled,$(FEATURE.asm)) + +LIBHB.yasm.src/ = $(LIBHB.src/)$(FEATURE.asm)/ +LIBHB.yasm.build/ = $(LIBHB.build/)$(FEATURE.asm)/ +LIBHB.yasm.asm = $(LIBHB.yasm.src/)deinterlace-a.asm +LIBHB.yasm.o = $(LIBHB.yasm.asm:$(LIBHB.yasm.src/)%.asm=$(LIBHB.yasm.build/)%.o) +LIBHB.yasm.d = $(wildcard $(LIBHB.yasmsrc/)*.h) + +LIBHB.YASM.I = $(LIBHB.yasm.src/) +LIBHB.YASM.ASM_O = $(strip $(YASM.exe) \ + -f $(LIBHB.YASM.f) \ + -m $(LIBHB.YASM.m) \ + $(LIBHB.YASM.D:%=-D%) \ + $(LIBHB.YASM.I:%=-I%) \ + -o $(1) $(2)) + +LIBHB.out += $(LIBHB.yasm.o) + +endif + +############################################################################### + +BUILD.out += $(LIBHB.out) diff --git a/libhb/module.rules b/libhb/module.rules index 7ac6e3f5a..6408700e4 100644 --- a/libhb/module.rules +++ b/libhb/module.rules @@ -3,7 +3,7 @@ $(eval $(call import.MODULE.rules,LIBHB)) libhb.build: $(LIBHB.a) $(LIBHB.a): | $(dir $(LIBHB.a)) -$(LIBHB.a): $(LIBHB.c.o) +$(LIBHB.a): $(LIBHB.c.o) $(LIBHB.yasm.o) $(AR.exe) rsu $@ $^ $(LIBHB.c.o): $(LIBHB.d) @@ -25,5 +25,20 @@ libhb.clean: ############################################################################### +ifneq (disabled,$(FEATURE.asm)) + +$(LIBHB.yasm.o): $(LIBHB.yasm.d) +$(LIBHB.yasm.o): | $(dir $(LIBHB.yasm.o)) +$(LIBHB.yasm.o): $(LIBHB.yasm.build/)%.o: $(LIBHB.yasm.src/)%.asm + $(call LIBHB.YASM.ASM_O,$@,$<) + +endif + +############################################################################### + clean: libhb.clean build: libhb.build + +xmike: + @echo $(LIBHB.yasm.asm) + @echo $(LIBHB.yasm.o) |