diff options
| author | Inqiyad Sabr <sabr@ariamath.xyz> | 2025-10-19 23:17:43 +0600 |
|---|---|---|
| committer | Inqiyad Sabr <sabr@ariamath.xyz> | 2025-10-19 23:17:43 +0600 |
| commit | ea5380fccb9f962203726540d69cb490048de7c0 (patch) | |
| tree | ceb8f56cef8deb086a328bfe840e327da7f16452 /Makefile | |
Add files
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..1610951 --- /dev/null +++ b/Makefile @@ -0,0 +1,32 @@ +.POSIX: + +RM := /bin/rm +DESTDIR := /usr/local/bin + +CFLAGS := -std=c99 -Wfloat-equal -Og +CFLAGS += -Wall -Werror -Wextra -Wpedantic +CFLAGS += -m64 -no-pie -pipe +CFLAGS += -ffunction-sections -fdata-sections +CFLAGS += -D_XOPEN_SOURCE=500L -flto +CFLAGS += -march=native -mtune=generic + +LDFLAGS := -static -Wl,--build-id=none +LDFLAGS += -ffunction-sections -fdata-sections +#LDFLAGS += -Wl,--strip-all +LDFLAGS += -Wl,--flto + +.SUFFIXES: .c .o + +bstatus: $(FILES) *.o + $(CC) $(LDFLAGS) *.o -o bstatus + +.c.o: + $(CC) $(CFLAGS) -c *.c + +clean: + $(RM) ./*.o + +install: + install -s -m0755 bstatus $(DESTDIR) + +.PHONY: make clean install |