summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorbryan <bryan@veltar.systems>2026-08-27 13:33:41 +0200
committerbryan <bryan@veltar.systems>2026-08-27 13:33:41 +0200
commitf92c62127cdbe6fb0831e911c5c6dc2b5db7a7c4 (patch)
treefb5659b274bb5117a93c4f021e2a654858c7d371 /Makefile
downloadselc-f92c62127cdbe6fb0831e911c5c6dc2b5db7a7c4.tar.gz
selc-f92c62127cdbe6fb0831e911c5c6dc2b5db7a7c4.zip
Initial import
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile34
1 files changed, 34 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..feab946
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,34 @@
+.POSIX:
+
+include config.mk
+
+HDR = config.h
+SRC = selc.c
+
+all: selc$(EXE)
+
+config.h:
+ copy /Y config.def.h config.h
+
+selc$(EXE): $(SRC) $(HDR)
+ $(CC) $(CFLAGS) -o $@ $(SRC) $(LDFLAGS)
+
+clean:
+ -$(RM) selc$(EXE)
+
+install: all
+ -mkdir "$(subst /,\,$(DESTDIR)$(BINDIR))"
+ copy /Y selc$(EXE) "$(subst /,\,$(DESTDIR)$(BINDIR)/selc$(EXE))"
+ @echo installed to $(DESTDIR)$(BINDIR)/selc$(EXE)
+
+uninstall:
+ -$(RM) "$(subst /,\,$(DESTDIR)$(BINDIR)/selc$(EXE))"
+
+boot: install
+ "$(subst /,\,$(DESTDIR)$(BINDIR))\selc$(EXE)" -i
+
+unboot:
+ -"$(subst /,\,$(DESTDIR)$(BINDIR))\selc$(EXE)" -u
+ -$(RM) "$(subst /,\,$(DESTDIR)$(BINDIR)/selc$(EXE))"
+
+.PHONY: all clean install uninstall boot unboot