I wrote a makefile which builds a C program attaching the x.264 header. After trying to execute the makefile in terminal I receive the fatal error: "example.c line [line of #include ] x264.h no such file or directory". Below you can find the C code and makefile (located in the same folder, the library - containing the x264.pc file- is in the folder libx264 of the parent folder). I would be very grateful if you could help with the linkage.
Makefile:
CC = gcc
CFLAGS = -c -Wall `export PKG_CONFIG_PATH=../libx264 && pkg-config --cflags x264`
LDFLAGS = -static `export PKG_CONFIG_PATH=../libx264 && pkg-config --libs --static libx264`
all: Release
Debug: CFLAGS += -g
Debug: example
Release: example
test: example.o
$(CC) -o example example.o $(LDFLAGS)
test.o: example.c
$(CC) $(CFLAGS) example.c -o example.o
clean:
rm -f example.o example
example.c code
#include <stdio.h>
#include <x264.h>
int main( int argc, char **argv )
{
int width, height;
return 0;
}