From 89fd7edb83b006d40126bd6fe5f4aac4571536a2 Mon Sep 17 00:00:00 2001 From: shin jaejong Date: Wed, 21 Sep 2022 11:22:00 +0900 Subject: [PATCH] Makefile modified to use pkg-config. and output binary renamed. --- Makefile | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 58 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index e9ec361..a21b465 100644 --- a/Makefile +++ b/Makefile @@ -6,27 +6,74 @@ CROSS_FREFIX = $(CC_PATH)/aarch64-poky-linux- GCC = $(CROSS_FREFIX)gcc CFLAGS=-mcpu=cortex-a53 -march=armv8-a+crc+crypto -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -#LDFLAGS=-lweston-client +LDFLAGS=-lpthread -lm +INC=-I./protocol -I./shared -I./ -INCPATH=-I./protocol -I./shared -I./ \ - -I/opt/fsl-imx-wayland/5.10-hardknott/sysroots/cortexa53-crypto-poky-linux/usr/include/cairo\ - -I/opt/fsl-imx-wayland/5.10-hardknott/sysroots/cortexa53-crypto-poky-linux/usr/include/libweston-9\ - -I/opt/fsl-imx-wayland/5.10-hardknott/sysroots/cortexa53-crypto-poky-linux/usr/include/pixman-1\ - -I/opt/fsl-imx-wayland/5.10-hardknott/sysroots/cortexa53-crypto-poky-linux/usr/include/pango-1.0\ - -I/opt/fsl-imx-wayland/5.10-hardknott/sysroots/cortexa53-crypto-poky-linux/usr/include/glib-2.0\ - -I/opt/fsl-imx-wayland/5.10-hardknott/sysroots/cortexa53-crypto-poky-linux/usr/lib/glib-2.0/include\ - -I/opt/fsl-imx-wayland/5.10-hardknott/sysroots/cortexa53-crypto-poky-linux/usr/include/harfbuzz +CFLAGS+=`pkg-config --cflags pixman-1` +LDFLAGS+=`pkg-config --libs pixman-1` + +CFLAGS+=`pkg-config --cflags libweston-9` +LDFLAGS+=`pkg-config --libs libweston-9` + +CFLAGS+=`pkg-config --cflags gtk+-wayland-3.0` +LDFLAGS+=`pkg-config --libs gtk+-wayland-3.0` + +CFLAGS+=`pkg-config --cflags glib-2.0` +LDFLAGS+=`pkg-config --libs glib-2.0` + +CFLAGS+=`pkg-config --cflags pango` +LDFLAGS+=`pkg-config --libs pango` + +CFLAGS+=`pkg-config --cflags harfbuzz` +LDFLAGS+=`pkg-config --libs harfbuzz` + +CFLAGS+=`pkg-config --cflags wayland-server` +LDFLAGS+=`pkg-config --libs wayland-server` + +CFLAGS+=`pkg-config --cflags wayland-client` +LDFLAGS+=`pkg-config --libs wayland-client` + +CFLAGS+=`pkg-config --cflags xkbcommon` +LDFLAGS+=`pkg-config --libs xkbcommon` + +CFLAGS+=`pkg-config --cflags wayland-cursor` +LDFLAGS+=`pkg-config --libs wayland-cursor` + +CFLAGS+=`pkg-config --cflags weston` +LDFLAGS+=`pkg-config --libs weston` + +CFLAGS+=`pkg-config --cflags cairo-png` +LDFLAGS+=`pkg-config --libs cairo-png` + +CFLAGS+=`pkg-config --cflags libjpeg` +LDFLAGS+=`pkg-config --libs libjpeg` + +#CFLAGS+=`pkg-config --cflags ` +#LDFLAGS+=`pkg-config --libs ` + +#CFLAGS+=`pkg-config --cflags ` +#LDFLAGS+=`pkg-config --libs ` + +#CFLAGS+=`pkg-config --cflags ` +#LDFLAGS+=`pkg-config --libs ` all: - $(GCC) $(CFLAGS)--sysroot $(SDKTARGETSYSROOT) $(LDFLAGS) $(INCPATH) -o weston-screenshooter \ + $(GCC) $(CFLAGS) --sysroot $(SDKTARGETSYSROOT) $(LDFLAGS) $(INC) -o weston-vncserver \ screenshot.c \ + protocol/pointer-constraints-unstable-v1-protocol.c \ + protocol/relative-pointer-unstable-v1-protocol.c \ + protocol/text-cursor-position-protocol.c \ + protocol/viewporter-protocol.c \ protocol/weston-screenshooter-protocol.c \ + protocol/xdg-shell-protocol.c \ shared/os-compatibility.c \ shared/xalloc.c \ shared/file-util.c \ shared/cairo-util.c \ + shared/frame.c \ + shared/image-loader.c \ window.c clean: - rm weston-screenshooter + rm weston-vncserver -- 2.1.4