2021-08-24 15:27:54 -04:00
|
|
|
PREFIX = ~/.local
|
2022-10-29 20:09:52 -04:00
|
|
|
VERSION = 0.2
|
2021-08-02 13:55:46 -04:00
|
|
|
|
2021-08-05 20:18:48 -04:00
|
|
|
# CC = cc
|
2022-10-27 21:17:24 -04:00
|
|
|
SRC = minrss.c util.c net.c handlers.c
|
2021-08-02 11:41:15 -04:00
|
|
|
OBJ = $(SRC:.c=.o)
|
2021-08-05 20:18:48 -04:00
|
|
|
PKG_CONFIG = pkg-config
|
|
|
|
CURL_CONFIG = curl-config
|
|
|
|
INCS = `$(PKG_CONFIG) --cflags libxml-2.0` `$(CURL_CONFIG) --cflags`
|
|
|
|
LIBS = `$(PKG_CONFIG) --libs libxml-2.0` `$(CURL_CONFIG) --libs`
|
2021-08-02 11:41:15 -04:00
|
|
|
WARN = -Wall -Wpedantic -Wextra
|
2021-08-05 20:18:48 -04:00
|
|
|
CFLAGS = $(INCS) $(LIBS) $(WARN) -DVERSION=\"$(VERSION)\"
|
2021-08-02 11:41:15 -04:00
|
|
|
|
|
|
|
all: config.h minrss
|
|
|
|
|
|
|
|
debug: CFLAGS += -g3
|
|
|
|
debug: config.h minrss
|
|
|
|
|
|
|
|
config.h:
|
|
|
|
cp config.def.h config.h
|
|
|
|
|
|
|
|
.c.o:
|
|
|
|
$(CC) $(CFLAGS) -c $<
|
|
|
|
|
|
|
|
minrss: $(OBJ)
|
|
|
|
$(CC) $(CFLAGS) -o $@ $(OBJ)
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f minrss $(OBJ)
|
|
|
|
|
2021-08-05 20:18:48 -04:00
|
|
|
install: CFLAGS += -O3
|
2021-08-02 11:41:15 -04:00
|
|
|
install: all
|
|
|
|
mkdir -p $(DESTDIR)$(PREFIX)/bin
|
|
|
|
cp -f minrss $(DESTDIR)$(PREFIX)/bin
|
|
|
|
chmod 755 $(DESTDIR)$(PREFIX)/bin/minrss
|
|
|
|
|
|
|
|
uninstall:
|
|
|
|
rm -f $(DESTDIR)$(PREFIX)/bin/minrss
|