Added simple Makefile and header files needed to compile on linux

This commit is contained in:
Marko Viitanen 2014-01-27 14:33:19 +02:00
parent 343cc7f272
commit f5c2292e06
2 changed files with 49 additions and 0 deletions

47
src/Makefile Normal file
View file

@ -0,0 +1,47 @@
# Simple Makefile for Kvazaar HEVC encoder
BITS = $(shell getconf LONG_BIT)
# Detect 32/64bit system
ifeq ($(BITS), 64)
ASMOBJS = test64.o
else
ASMOBJS = test.o
endif
DFLAGS =
ifeq ($(SYSTEM),Darwin)
DFLAGS += -D__APPLE__
endif
ifeq ($(SYSTEM),FreeBSD)
DFLAGS += -D__FREEBSD__
endif
ifeq ($(SYSTEM),SunOS)
DFLAGS += -D__SOLARIS__
endif
CC = gcc
CCFLAGS = $(DFLAGS) -I. -I/usr/local/include -L/usr/local/lib
LDFLAGS = -lm
LD = gcc
YASM = yasm
ASMOBJS = test64.o
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 sao.o search.o transform.o
PROG = ./kvazaar
PROGS = $(PROG)
$(PROG): $(OBJS) $(ASMOBJS)
$(LD) $(LDFLAGS) $^ -o $@
test.o: x86/test.asm
$(YASM) -f elf x86/test.asm -o test.o
test64.o: x64/test64.asm
$(YASM) -f elf64 x64/test64.asm -o test.o
%.o: %.c
$(CC) $(CCFLAGS) -c $< -o $@
all: $(PROGS)

View file

@ -32,6 +32,8 @@
#include "../include/stdint.h" #include "../include/stdint.h"
#else #else
#include <stdint.h> #include <stdint.h>
#include <stdio.h>
#include <limits.h>
#endif #endif
#if _MSC_VER && _M_AMD64 #if _MSC_VER && _M_AMD64