-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (29 loc) · 850 Bytes
/
Copy pathMakefile
File metadata and controls
40 lines (29 loc) · 850 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
37
38
39
40
# ---------------- Makefile for OCRCap ----------------
# Compiler
CC = gcc
# Compiler flags
CFLAGS = -O2 -Wall `pkg-config --cflags gtk+-3.0 lept tesseract`
# Linker flags
LIBS = `pkg-config --libs gtk+-3.0 lept tesseract` -lm
# Source files
SRC_OC = main.c
SRC_PREFS = ocrcap_prefs.c
# Target executables
TARGET_OC = ocrcap
TARGET_PREFS = ocrcap_prefs
# Default build
all: $(TARGET_OC) $(TARGET_PREFS)
# Build OCRCap
$(TARGET_OC): $(SRC_OC)
$(CC) $(CFLAGS) -o $@ $^ $(LIBS)
# Build Preferences module
$(TARGET_PREFS): $(SRC_PREFS)
$(CC) $(CFLAGS) -o $@ $^ $(LIBS)
# Clean build artifacts
clean:
rm -f $(TARGET_OC) $(TARGET_PREFS)
# Install (optional)
install: $(TARGET_OC) $(TARGET_PREFS)
install -Dm755 $(TARGET_OC) /usr/local/bin/$(TARGET_OC)
install -Dm755 $(TARGET_PREFS) /usr/local/bin/$(TARGET_PREFS)
.PHONY: all clean install