This commit is contained in:
2022-03-01 09:46:33 +03:00
parent b25c15cbfc
commit 5eda1fae3f
20 changed files with 103 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
# run `make DEF=...` to add extra defines
PROGRAM = noon
LDFLAGS := -fdata-sections -ffunction-sections -Wl,--gc-sections -Wl,--discard-all
LDFLAGS += -lnova
SRCS := $(wildcard *.c)
DEFINES := $(DEF) -D_GNU_SOURCE -D_XOPEN_SOURCE=1111
CFLAGS += -O2 -Wno-trampolines -std=gnu99
CC = gcc
LINKS := sunrise sunset
all : $(LINKS)
$(LINKS) : $(PROGRAM)
@echo "make links"
ln -s $< $@ || true
$(PROGRAM): sun.c
@echo -e "\t\tCC $<"
$(CC) $(LDFLAGS) $(CFLAGS) $(DEFINES) -o $@ $<