123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171 |
- #-------------------------------------------------------------------------------
- #- --
- #- This software is confidential and proprietary and may be used --
- #- only as expressly authorized by a licensing agreement from --
- #- --
- #- Hantro Products Oy. --
- #- --
- #- (C) COPYRIGHT 2006 HANTRO PRODUCTS OY --
- #- ALL RIGHTS RESERVED --
- #- --
- #- The entire notice above must be reproduced --
- #- on all copies and should not be removed. --
- #- --
- #-------------------------------------------------------------------------------
- #-
- #-- Abstract : Makefile for 8290 JPEG encoder testbench
- #--
- #-------------------------------------------------------------------------------
- # Comment/uncomment the following line to disable/enable debugging
- DEBUG = y
- # set this to 'y' for Electric Fence checking
- USE_EFENCE = n
- # Add your debugging flag (or not) to CFLAGS
- ifeq ($(DEBUG),y)
- DEBFLAGS = -O1 -g -DDEBUG
- else
- DEBFLAGS = -O3 -DNDEBUG
- endif
- # This is used for testing with system model
- # encoder uses comment header spefified in test bench
- # if you want to use own comment header data, comment this out!
- DEBFLAGS +=-DTB_DEFINED_COMMENT
- # this is used only for integrator tracing
- #DEBFLAGS += -DASIC_WAVE_TRACE_TRIGGER
- # Architecture flags for gcc
- #ARCH =
- #CROSS_COMPILE =
- ifeq ($(shell uname -m),x86_64)
- ifneq (,$(findstring pclinux,$(MAKECMDGOALS)))
- export ARCH = -m32
- endif
- ifneq (,$(findstring system,$(MAKECMDGOALS)))
- export ARCH = -m32
- endif
- ifneq (,$(findstring testdata,$(MAKECMDGOALS)))
- export ARCH = -m32
- endif
- ifneq (,$(findstring eval,$(MAKECMDGOALS)))
- export ARCH = -m32
- endif
- endif
- # C -compiler name, can be replaced by another compiler(replace gcc)
- CC = $(CROSS_COMPILE)gcc
- # the path where to find header files
- INCFLAGS = -I../../../inc -I../../../source/jpeg -I../../../source/common \
- -I../../debug_trace
- ifeq ($(USE_EFENCE), y)
- EFENCE= -DUSE_EFENCE -I/afs/hantro.com/projects/adder/users/atna/efence_2_4_13 \
- -L/afs/hantro.com/projects/adder/users/atna/efence_2_4_13 \
- -lefence -lpthread
- endif
- # compiler switches
- CFLAGS = $(ARCH) -Wall -D_GNU_SOURCE -D_REENTRANT -D_THREAD_SAFE \
- $(DEBFLAGS) $(INCFLAGS)
- # list of used sourcefiles
- SRCS = JpegTestBench.c EncGetOption.c
- OBJS = $(SRCS:.c=.o)
- # name of the input library
- LIB = ../../lib8290enc.a
- # System model library
- MODELLIB = ../../../../system/models/enc8290_asic_model.a
- # System model library that writes test data traces
- TESTDATALIB = ../../../../system/models/enc8290_asic_model_trace.a
- # name of the output executable
- TARGET = jpeg_testenc
- # MACRO for cleaning object -files
- RM = rm -f
- #Here are rules for building codes and generating executable
- all: tags
- @echo ---------------------------------------
- @echo "Usage: make [ system | testdata | versatile ]"
- @echo "system - PC system model (==pclinux)"
- @echo "testdata - PC system model for test data creation"
- @echo "integrator - ARM integrator with FPGA HW"
- @echo "versatile - ARM versatile with FPGA HW"
- @echo "NOTE! Make sure to do 'make libclean'"
- @echo "between compiling to different targets!"
- @echo ---------------------------------------
- # Use other makefiles to build the libraries
- $(MODELLIB):
- $(MAKE) -w -C ../../../../system/models
- $(TESTDATALIB):
- $(MAKE) -w -C ../../../../system/models testdata
- $(LIB):
- $(MAKE) -w -C ../.. $(TARGETENV) INCLUDE_H264=n INCLUDE_VIDSTAB=n USE_EFENCE=$(USE_EFENCE)
- pclinux: system
- .PHONY: system
- system: TARGETENV = system
- system: $(MODELLIB) $(LIB) $(OBJS)
- $(CC) $(CFLAGS) $(OBJS) $(LIB) $(MODELLIB) -o $(TARGET)
- eval: TARGET = jpeg_enc_8290_eval
- eval: system
- .PHONY: testdata
- testdata: TARGETENV = testdata
- testdata: $(TESTDATALIB) $(LIB) $(OBJS)
- $(CC) $(CFLAGS) $(OBJS) $(LIB) $(TESTDATALIB) -o $(TARGET)
- versatile: TARGETENV = versatile
- versatile: CFLAGS+=-DSDRAM_LM_BASE=0x00000000 -DMEMALLOC_MODULE_PATH=\"/tmp/dev/memalloc\"
- versatile: CROSS_COMPILE = arm-none-linux-gnueabihf-
- versatile: ARCH = -mcpu=cortex-a5 -mtune=cortex-a5
- versatile: LIB += -lpthread
- versatile: $(OBJS)
- $(MAKE) -w -C ../.. $@ INCLUDE_H264=n INCLUDE_VIDSTAB=n \
- USE_EFENCE=$(USE_EFENCE) CROSS_COMPILE=$(CROSS_COMPILE) ARCH="$(ARCH)"
- $(CC) $(CFLAGS) $(OBJS) $(LIB) $(EFENCE) -o $(TARGET)
- integrator: TARGETENV = integrator
- integrator: CROSS_COMPILE= arm-linux-
- integrator: ARCH = -mcpu=arm9tdmi -mtune=arm9tdmi
- integrator: CFLAGS+=-DSDRAM_LM_BASE=0x80000000 -DMEMALLOC_MODULE_PATH=\"/dev/memalloc\"
- integrator: LIB += -lpthread
- integrator: $(OBJS)
- $(MAKE) -w -C ../.. $@ INCLUDE_H264=n INCLUDE_VIDSTAB=n \
- USE_EFENCE=$(USE_EFENCE) CROSS_COMPILE=$(CROSS_COMPILE) ARCH="$(ARCH)"
- $(CC) $(CFLAGS) $(OBJS) $(LIB) $(EFENCE) -o $(TARGET)
- system_cov: CC = covc --retain -t!JpegTestBench.c,!EncGetOption.c g++
- system_cov: TARGETENV = system_cov
- system_cov: $(MODELLIB) $(LIB) $(OBJS)
- $(CC) $(CFLAGS) $(OBJS) $(LIB) $(MODELLIB) -o $(TARGET)
- .PHONY: clean
- clean:
- $(RM) *.o core* *~ $(TARGET)*
- .PHONY: libclean
- libclean: clean
- $(MAKE) -w -C ../.. clean
- .PHONY: tags
- tags:
- ctags ../../../inc/*.h *.c ../../../source/jpeg/*.[ch] \
- ../../../source/common/*.[ch] ../../ewl/*c
|