2024-02-14 19:28:06 +00:00
|
|
|
CC = gcc
|
2024-02-14 21:05:09 +00:00
|
|
|
DESTDIR = /usr/bin
|
2024-02-15 19:06:54 +00:00
|
|
|
SHAREDIR = /usr/share
|
2024-02-14 19:28:06 +00:00
|
|
|
CFLAGS = -Wall -Wextra -g
|
|
|
|
PKG_CONFIG = pkg-config
|
|
|
|
GTK_LIBS = $(shell $(PKG_CONFIG) --libs gtk+-3.0)
|
2024-02-15 19:26:38 +00:00
|
|
|
WEBKIT_LIBS = $(shell $(PKG_CONFIG) --libs webkit2gtk-4.1)
|
2024-02-14 19:28:06 +00:00
|
|
|
LIBS = $(GTK_LIBS) $(WEBKIT_LIBS)
|
2024-02-15 19:26:38 +00:00
|
|
|
INCLUDES = $(shell $(PKG_CONFIG) --cflags gtk+-3.0 webkit2gtk-4.1)
|
2024-02-14 19:28:06 +00:00
|
|
|
|
2024-02-29 18:16:43 +00:00
|
|
|
SRCS = burgernotes.c
|
2024-02-14 19:28:06 +00:00
|
|
|
OBJS = $(SRCS:.c=.o)
|
2024-02-29 18:16:43 +00:00
|
|
|
TARGET = burgernotes
|
2024-02-14 19:28:06 +00:00
|
|
|
|
|
|
|
.PHONY: all clean
|
|
|
|
|
2024-02-29 18:16:43 +00:00
|
|
|
all: burgernotes
|
2024-02-14 19:28:06 +00:00
|
|
|
|
2024-02-29 18:16:43 +00:00
|
|
|
burgernotes: $(TARGET)
|
2024-02-14 19:28:06 +00:00
|
|
|
$(TARGET): $(OBJS)
|
|
|
|
$(CC) $(CFLAGS) $(OBJS) -o $(TARGET) $(LIBS)
|
|
|
|
|
|
|
|
%.o: %.c
|
|
|
|
$(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f $(OBJS) $(TARGET)
|
2024-02-14 21:05:09 +00:00
|
|
|
|
2024-02-29 18:16:43 +00:00
|
|
|
install: burgernotes
|
2024-02-14 21:05:09 +00:00
|
|
|
mkdir -p $(DESTDIR)
|
2024-02-29 18:16:43 +00:00
|
|
|
mkdir -p $(SHAREDIR)/burgernotes
|
|
|
|
cp burgernotes $(SHAREDIR)/burgernotes/
|
|
|
|
ln -sf $(SHAREDIR)/burgernotes/burgernotes $(DESTDIR)/burgernotes
|
2024-02-25 16:04:47 +00:00
|
|
|
mkdir -p $(SHAREDIR)/icons/hicolor/scalable/apps/
|
2024-02-15 19:06:54 +00:00
|
|
|
mkdir -p $(SHAREDIR)/applications/
|
2024-02-15 19:12:11 +00:00
|
|
|
mkdir -p $(SHAREDIR)/metainfo/
|
2024-02-29 18:16:43 +00:00
|
|
|
cp org.hectabit.Burgernotes.svg $(SHAREDIR)/icons/hicolor/scalable/apps/
|
|
|
|
cp org.hectabit.Burgernotes.desktop $(SHAREDIR)/applications/
|
|
|
|
cp org.hectabit.Burgernotes.metainfo.xml $(SHAREDIR)/metainfo/
|
2024-02-29 19:01:15 +00:00
|
|
|
cp -r website $(SHAREDIR)/burgernotes/website
|