PDOS

[uia] / trunk / uia / vxa / Makefrag  

View of /trunk/uia/vxa/Makefrag

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2805 - (download) (annotate)
Tue Sep 4 12:20:30 2007 UTC (2 years, 2 months ago) by baford
File size: 2479 byte(s)
...
# Main top-level makefile fragment for VXA archiver tools.


# Compiler flags common to both host and VX32 environment files.
COMMON_CFLAGS = -g -O3 -MD -std=gnu99 -I. -Ivm $(CFLAGS)
#COMMON_CFLAGS = -g -MD -std=gnu99 -I. -Ivm $(CFLAGS)
COMMON_LDFLAGS = -g -L. -Lvm $(LDFLAGS)


# Host environment compiler options
HOST_CC		:= $(CC)
HOST_LD		:= $(LD)
HOST_AR		:= $(AR)
HOST_LDFLAGS	:= $(COMMON_LDFLAGS)
HOST_CFLAGS	:= -I$(HOST_ARCH) $(COMMON_CFLAGS)
HOST_LDLIBS	:= $(LIBS)


# Compile host code in same floating-point environment as vx32 code:
# uncomment this when making comparisons between native and vx32 performance
# to ensure an "apples to apples" comparison.
HOST_CFLAGS	+= -msse2 -mfpmath=sse -mno-fp-ret-in-387
HOST_LDLIBS	+= -lchost


# Stuff for building shared libraries on the host
HOST_LTCC = $(LIBTOOL) --mode=compile $(HOST_CC)
HOST_LTLD = $(LIBTOOL) --mode=link $(HOST_CC) -rpath $(LIBDIR)
HOST_LTAR = $(LIBTOOL) --mode=link $(HOST_CC) -static


# VX32 environment compiler options
VX32_CFLAGS := -nostdinc -Ivm/cinc $(COMMON_CFLAGS)
VX32_LDFLAGS := -Lvm/clib -L$(dir $(shell $(VX32_CC) -print-libgcc-file-name)) \
		-Ttext=0x20000 -e start $(COMMON_LDFLAGS) vm/clib/vx32/crt0.o
VX32_LDLIBS := -lc -lgcc


# Where to install VXA codecs
VXADIR		:= $(exec_prefix)/lib/vxa


# Make sure that 'all' is the first target
all: vm-all

# Eliminate default suffix rules
.SUFFIXES:

# Delete target files if there is an error (or make is interrupted)
.DELETE_ON_ERROR:


# Main vxa support library
include vxa/Makefrag

# Codecs
include zlib/Makefrag
include bz2/Makefrag
include jpeg/Makefrag
include jp2/Makefrag
#include ffmpeg/Makefrag
include flac/Makefrag
include vorbis/Makefrag

# Programs
#include zip/Makefrag		-- currently broken
#include unzip/Makefrag		-- currently broken


# How to make linkable .o files out of VX binaries
%-bin.c: % bin2c.pl
	$(PERL) bin2c.pl <$< >$@ vxa_$(notdir $<)


DEPS_FILES := $(wildcard $(addsuffix /*.d,$(OBJDIRS)))
CLEAN_FILES += .deps $(DEPS_FILES)

clean: vxa-clean vm-clean

vxa-clean:
	rm -f $(CLEAN_FILES)


# Pseudo-targets for the VM subdirectory
vm-all:
	$(MAKE) -C vm
vm-clean:
	$(MAKE) -C vm clean


# This magic automatically generates makefile dependencies
# for header files included from C source files we compile,
# and keeps those dependencies up-to-date every time we recompile.
# See 'vm/mergedep.pl' for more information.
.deps: $(DEPS_FILES)
	@mkdir -p $(@D)
	@$(PERL) vm/mergedep.pl $@ $^

-include .deps


Maintained by PDOS
ViewVC Help
Powered by ViewVC 1.0.3