diff options
author | s-over-4 | 2023-06-12 17:45:00 -0400 |
---|---|---|
committer | s-over-4 | 2023-06-12 17:45:00 -0400 |
commit | 8ca9ffe9e9d9823664f0b93fcca57d1de6edf807 (patch) | |
tree | 1a12241b52945136c55f135a48d6864a17b4219a /Makefile | |
parent | c42c82d4c48a2e53e62ebd04c9ed1c03a4f42294 (diff) |
halk
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 20 |
1 files changed, 8 insertions, 12 deletions
@@ -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 |