initial commit

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I8fb23c4cd0a1b173a390edb8495b781c6a6a6964
This commit is contained in:
raf 2025-11-27 18:31:14 +03:00
commit 6bcd1ccdc9
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF
2 changed files with 625 additions and 0 deletions

24
Makefile Normal file
View file

@ -0,0 +1,24 @@
PREFIX ?= /usr
BINDIR ?= $(PREFIX)/bin
CC ?= gcc
CFLAGS ?= -O2 -Wall -Wextra -Wpedantic
LDFLAGS ?= -Wl,-z,relro,-z,now -Wl,-z,noexecstack -Wl,-z,separate-code -pie
LDLIBS ?= -lsystemd
SRC = main.c
BIN = sin
.PHONY: all clean install test
all: $(BIN)
$(BIN): $(SRC)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(SRC) $(LDLIBS)
install: $(BIN)
install -d $(DESTDIR)$(BINDIR)
install -m 0755 $(BIN) $(DESTDIR)$(BINDIR)/$(BIN)
clean:
-rm -f $(BIN) test_sin