-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
36 lines (26 loc) · 778 Bytes
/
Makefile
File metadata and controls
36 lines (26 loc) · 778 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Compiler
CC = gcc
# Compiler flags
CFLAGS = -Wall -g -lm `pkg-config --cflags gtk+-3.0 poppler-glib`
# Source files
SRCS = main.c controls.c pdf_view.c pdf_events.c
# Header files
HEADERS = controls.h pdf_view.h pdf_events.h
# Target executable
TARGET = pdfc
# Installation directory
INSTALL_DIR = /usr/local/bin
# Default target
all: $(TARGET)
# Build the target
$(TARGET): $(SRCS) $(HEADERS)
$(CC) -o $(TARGET) $(SRCS) $(CFLAGS) `pkg-config --libs gtk+-3.0 poppler-glib`
# Install target to copy the executable to /usr/local/bin/
install: $(TARGET)
install -m 755 $(TARGET) $(INSTALL_DIR)/
# Uninstall target to remove the executable from /usr/local/bin/
uninstall:
rm -f $(INSTALL_DIR)/$(TARGET)
# Clean target to remove compiled files
clean:
rm -f $(TARGET)