uvg266/src/Makefile

80 lines
1.8 KiB
Makefile
Raw Normal View History

# Simple Makefile for Kvazaar HEVC encoder
ifeq (, $(ARCH))
ARCH = $(shell uname -m)
endif
SYSTEM = $(shell uname -s)
ASMFLAGS =
2014-06-04 12:22:06 +00:00
DFLAGS = -O2 -g -Werror -march=native -ftree-vectorize
# ARCH related flags
ifeq ($(ARCH), x86_64)
TARGET_CPU_BITS := 64
TARGET_CPU_ARCH := x86
else ifeq ($(ARCH), ppc64)
TARGET_CPU_BITS := 64
TARGET_CPU_ARCH := ppc
else
#safe (?) defaults
TARGET_CPU_BITS := 32
TARGET_CPU_ARCH := x86
endif
DFLAGS += -m$(TARGET_CPU_BITS)
LDFLAGS += -m$(TARGET_CPU_BITS)
# Windows (cygwin/mingw) specific flags
ifneq ( ,$(findstring Windows, $(OS)))
ifeq ($(ARCH), x86_64)
ASMFLAGS += -f win64
else
ASMFLAGS += -f win32
2014-02-21 12:53:47 +00:00
ASMFLAGS += -DPREFIX
endif
DFLAGS += -D__USE_MINGW_ANSI_STDIO=1
# OS X specific flags
else ifeq ($(SYSTEM),Darwin)
ifeq ($(ARCH), x86_64)
ASMFLAGS += -f macho64
else
ASMFLAGS += -f macho32
endif
ASMFLAGS += -DPREFIX
# Default to Linux/elf specific flags
else
2014-02-21 12:53:47 +00:00
ifeq ($(ARCH), x86_64)
ASMFLAGS += -f elf64
else
ASMFLAGS += -f elf32
endif
endif
2014-05-13 09:19:52 +00:00
CC = gcc
CCFLAGS = $(DFLAGS) -I. -Wall -Wtype-limits
LDFLAGS += -lm
2014-05-16 06:47:04 +00:00
LD = gcc -pthread -lrt
OBJS = interface_main.o encmain.o bitstream.o cabac.o config.o context.o cu.o encoder.o encoderstate.o filter.o inter.o intra.o nal.o imagelist.o rdo.o sao.o scalinglist.o search.o strategyselector.o tables.o threadqueue.o transform.o encoder_state-bitstream.o encoder_state-ctors_dtors.o encoder_state-geometry.o image.o videoframe.o
PROG = ./kvazaar
PROGS = $(PROG)
DEPS = $(OBJS:.o=.d)
all: $(PROGS)
.PHONY: all clean
$(PROG): $(OBJS) $(ASMOBJS)
$(LD) $^ $(LDFLAGS) -o $@
2014-04-15 13:47:17 +00:00
%.o: %.c Makefile
$(CC) $(CCFLAGS) -c $< -o $@
2014-04-15 13:47:17 +00:00
%.d: %.c Makefile
$(CC) $(CCFLAGS) -MF"$@" -MG -MM -MP -MT"$@" -MT"$(<:.c=.o)" "$<"
2014-04-16 06:09:10 +00:00
clean:
echo $(ARCH)
rm -f $(OBJS) $(PROGS) $(ASMOBJS) $(DEPS)
-include $(DEPS)