File: Makefile

package info (click to toggle)
esstra 0.3.0-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 5,872 kB
  • sloc: ansic: 2,615; python: 510; cpp: 247; makefile: 113; sh: 3
file content (28 lines) | stat: -rw-r--r-- 678 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# SPDX-FileCopyrightText: Copyright 2024-2025 Sony Group Corporation
# SPDX-License-Identifier: MIT

CC := gcc
GCC_MAJOR_VERSION := $(shell $(CC) -dumpversion)
GCC_ARCH := $(shell $(CC) -dumpmachine)

PREFIX ?= /usr/local
GCC_PLUGIN_DIR := $(DESTDIR)/$(PREFIX)/lib/gcc/$(GCC_ARCH)/$(GCC_MAJOR_VERSION)/plugin
GCC_PLUGIN_DIR := $(subst //,/,$(GCC_PLUGIN_DIR))
ESSTRACORE ?= $(GCC_PLUGIN_DIR)/esstracore.so
ESSTRACORE := $(subst //,/,$(ESSTRACORE))

ifdef DEBUG
DEBUGFLAG := -fplugin-arg-esstracore-debug=$(DEBUG)
endif

CFLAGS += -fplugin=$(ESSTRACORE) $(DEBUGFLAG) -O2 -Wall

.PHONY: all clean

all: hello

hello: hello.c
	$(CC) $(CFLAGS) $< -o hello

clean:
	rm -f hello *.bak