2014-01-27 12:33:19 +00:00
|
|
|
# Simple Makefile for Kvazaar HEVC encoder
|
|
|
|
|
2014-01-30 15:56:52 +00:00
|
|
|
ARCH = $(shell uname -p)
|
|
|
|
SYSTEM = $(shell uname -s)
|
|
|
|
ASMFLAGS =
|
|
|
|
DFLAGS =
|
2014-01-27 12:33:19 +00:00
|
|
|
|
2014-01-30 15:56:52 +00:00
|
|
|
# ARCH related flags
|
|
|
|
ifeq ($(ARCH), x86_64)
|
|
|
|
ASMFLAGS += -DARCH_X86_64=1
|
2014-01-27 12:33:19 +00:00
|
|
|
else
|
2014-01-30 15:56:52 +00:00
|
|
|
ASMFLAGS += -DARCH_X86_64=0
|
2014-01-27 12:33:19 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
|
2014-01-30 15:56:52 +00:00
|
|
|
# Linux specifix flags
|
|
|
|
ifeq ($(SYSTEM),Linux)
|
|
|
|
ifeq ($(ARCH), x86_64)
|
|
|
|
ASMFLAGS += -f elf64
|
|
|
|
else
|
|
|
|
ASMFLAGS += -f elf32
|
|
|
|
endif
|
2014-01-27 12:33:19 +00:00
|
|
|
endif
|
2014-01-30 15:56:52 +00:00
|
|
|
|
|
|
|
# OS X specific flags
|
|
|
|
ifeq ($(SYSTEM),Darwin)
|
|
|
|
ifeq ($(ARCH), x86_64)
|
|
|
|
ASMFLAGS += -f macho64
|
|
|
|
else
|
|
|
|
ASMFLAGS += -f macho32
|
|
|
|
endif
|
|
|
|
ASMFLAGS += -DPREFIX
|
2014-01-27 12:33:19 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
CC = gcc
|
|
|
|
CCFLAGS = $(DFLAGS) -I. -I/usr/local/include -L/usr/local/lib
|
|
|
|
LDFLAGS = -lm
|
|
|
|
LD = gcc
|
|
|
|
YASM = yasm
|
2014-01-30 15:56:52 +00:00
|
|
|
ASMOBJS = cpu.o
|
2014-01-27 12:36:10 +00:00
|
|
|
OBJS = interface_main.o encmain.o bitstream.o cabac.o config.o context.o debug.o encoder.o filter.o inter.o intra.o nal.o picture.o rdo.o sao.o search.o transform.o
|
2014-01-27 12:33:19 +00:00
|
|
|
PROG = ./kvazaar
|
|
|
|
PROGS = $(PROG)
|
|
|
|
|
2014-01-30 15:56:52 +00:00
|
|
|
|
2014-01-27 12:33:19 +00:00
|
|
|
$(PROG): $(OBJS) $(ASMOBJS)
|
2014-01-29 15:34:31 +00:00
|
|
|
$(LD) $^ $(LDFLAGS) -o $@
|
2014-01-27 12:33:19 +00:00
|
|
|
|
2014-01-30 15:56:52 +00:00
|
|
|
cpu.o: x86/cpu.asm
|
|
|
|
$(YASM) $(ASMFLAGS) x86/cpu.asm -o cpu.o
|
2014-01-27 12:33:19 +00:00
|
|
|
|
|
|
|
%.o: %.c
|
|
|
|
$(CC) $(CCFLAGS) -c $< -o $@
|
|
|
|
|
|
|
|
all: $(PROGS)
|