shithub: psxe

ref: b33cb7c71a209e2600e9078e00f4d807298a28a2
dir: /Makefile/

View raw version
.ONESHELL:

VERSION_TAG := $(shell git describe --always --tags --abbrev=0)
COMMIT_HASH := $(shell git rev-parse --short HEAD)
OS_INFO := $(shell uname -rmo)

SOURCES := $(wildcard psx/*.c)
SOURCES += $(wildcard psx/dev/*.c)
SOURCES += main.c

bin/psxe main.c:
	mkdir -p bin

	gcc $(SOURCES) -o bin/psxe \
		-DOS_INFO="$(OS_INFO)" \
		-DREP_VERSION="$(VERSION_TAG)" \
		-DREP_COMMIT_HASH="$(COMMIT_HASH)" \
		-g -DLOG_USE_COLOR

clean:
	rm -rf "bin"