initial commit
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I8fb23c4cd0a1b173a390edb8495b781c6a6a6964
This commit is contained in:
commit
6bcd1ccdc9
2 changed files with 625 additions and 0 deletions
24
Makefile
Normal file
24
Makefile
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue