From 8ca9ffe9e9d9823664f0b93fcca57d1de6edf807 Mon Sep 17 00:00:00 2001 From: s-over-4 Date: Mon, 12 Jun 2023 17:45:00 -0400 Subject: halk --- Makefile | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 42b6fdb..5b589df 100644 --- a/Makefile +++ b/Makefile @@ -1,26 +1,22 @@ -binname := halk -exec := $(binname).out - -compiler := clang +name := halk +cc := cc flags := -g - sources := $(wildcard src/*.c) sources := $(filter-out src/parser.c, $(sources)) # exclude the incomplete parser for now. objects := $(sources:.c=.o) - -$(exec): $(objects) - $(compiler) $(objects) $(flags) -o $(exec) +$(name): $(objects) + $(cc) $(objects) $(flags) -o ./$(name) %.o: %.c include/%.h - $(compiler) -c $(flags) $< -o $@ + $(cc) -c $(flags) $< -o $@ install: make - cp ./$(exec) /usr/local/bin/$(binname) + cp ./$(name) $(XDG_DATA_HOME)/bin/$(name) uninstall: - rm -f /usr/local/bin/$(binname) + rm -f $(XDG_DATA_HOME)/bin/$(name) clean: - rm -f *.out *.o src/*.o + rm -f ./$(name) ./src/*.o -- cgit v1.2.3