Codeberg

summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile28
1 files changed, 28 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..68fa045
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,28 @@
+CC = gcc
+CFLAGS = `pkg-config --cflags gtk+-2.0` -Wall -Wextra -g
+LIBS = `pkg-config --libs gtk+-2.0`
+
+OBJ = main.o md_render.o
+TARGET = mdviewer
+
+all: $(TARGET)
+
+$(TARGET): $(OBJ)
+ $(CC) -o $@ $^ $(LIBS)
+
+%.o: %.c
+ $(CC) $(CFLAGS) -c $< -o $@
+
+deb: $(TARGET)
+ mkdir -p pkg/DEBIAN
+ mkdir -p pkg/usr/bin
+ mkdir -p pkg/usr/share/applications
+ mkdir -p pkg/usr/share/icons/hicolor/48x48/apps
+ cp $(TARGET) pkg/usr/bin/
+ cp mdviewer.desktop pkg/usr/share/applications/
+ cp control pkg/DEBIAN/
+ convert /home/laki/.gemini/antigravity/brain/b3043472-8254-4c94-b2c0-7c8bf8ae13da/mdviewer_icon_1769114997833.png -resize 48x48 pkg/usr/share/icons/hicolor/48x48/apps/mdviewer.png
+ dpkg-deb --build pkg mdviewer.deb
+
+clean:
+ rm -rf $(OBJ) $(TARGET) pkg mdviewer.deb