diff options
| author | Albert Cervin <albert@acervin.com> | 2025-11-25 15:20:20 +0100 |
|---|---|---|
| committer | Albert Cervin <albert@acervin.com> | 2025-11-25 15:20:20 +0100 |
| commit | c21bd5f2d9f4ec2230b31040fd3c34cbe417476f (patch) | |
| tree | c4d43d09326ea623172bd2763e7076d5e79dc751 /Makefile | |
| parent | f5645976b2ed01e643db9183826b6afdf9a96541 (diff) | |
| download | dged-c21bd5f2d9f4ec2230b31040fd3c34cbe417476f.tar.gz dged-c21bd5f2d9f4ec2230b31040fd3c34cbe417476f.tar.xz dged-c21bd5f2d9f4ec2230b31040fd3c34cbe417476f.zip | |
Fix mode not being kept on the file
Also add a revision to the --version
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -64,6 +64,8 @@ CFLAGS ?= -g -O2 CFLAGS += -Werror -Wall -Wextra -std=c99\ -I $(.CURDIR)/src\ -I $(.CURDIR)/src/main\ + -I $(.OBJDIR)/src\ + -I $(.OBJDIR)/src/main\ -DDATADIR="$(prefix)/$(datadir)"\ -DTEST_ROOT="$(.CURDIR)/test" @@ -120,19 +122,24 @@ FILES = $(DEPS) \ $(MAIN_OBJS) \ $(OBJS) \ $(TEST_OBJS) \ + src/main/revision.h \ dged \ libdged.a +src/main/revision.h: scripts/generate-revision + @$(.CURDIR)/scripts/generate-revision $@ + # dependency generation -.c.d: config.mk +.c.d: config.mk src/main/revision.h @mkdir -p $(@D) $(CC) -MM $(CFLAGS) -MT $*.o $< > $@ @sed -i 's,\($*\)\.o[ :]*,\1.o $@ : ,g' $@ -.c.o: config.mk +.c.o: config.mk src/main/revision.h @mkdir -p $(@D) $(CC) $(CFLAGS) -c $< -o $@ +# TODO: remove this grammars: @if [ "$(SYNTAX_ENABLE)" = "true" ] && [ -n "$$BUNDLE_TREESITTER_GRAMMARS" ]; then \ IFS=":"; for p in "$$BUNDLE_TREESITTER_GRAMMARS"; do \ @@ -142,7 +149,7 @@ grammars: mkdir -p ./grammars; \ fi -dged: $(MAIN_OBJS) libdged.a grammars +dged: src/main/revision.h $(MAIN_OBJS) libdged.a grammars $(CC) $(LDFLAGS) $(MAIN_OBJS) libdged.a -o dged -lm libdged.a: $(OBJS) |
