summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile15
1 files changed, 11 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 23fddd6..f51aa9b 100644
--- a/Makefile
+++ b/Makefile
@@ -1,17 +1,17 @@
ALL_CFLAGS=$(CFLAGS) -Wall -Wextra -Wshadow -Wconversion -Wpedantic -pedantic -std=gnu11 \
-Wno-unused-function -Wno-fixed-enum-extension -Wimplicit-fallthrough -Wno-format-truncation -Wno-unknown-warning-option
-LIBS=-lSDL2 -lGL -ldl -lm
+LIBS=-lSDL2 -lGL -ldl -lm libpcre2-32.a -Ipcre2-10.36/build
DEBUG_CFLAGS=$(ALL_CFLAGS) -DDEBUG -O0 -g
RELEASE_CFLAGS=$(ALL_CFLAGS) -O3
PROFILE_CFLAGS=$(ALL_CFLAGS) -O3 -DPROFILE=1
GLOBAL_DATA_DIR=/usr/share/ted
LOCAL_DATA_DIR=/home/`logname`/.local/share/ted
INSTALL_BIN_DIR=/usr/bin
-ted: *.[ch]
+ted: *.[ch] libpcre2-32.a
$(CC) main.c -o ted $(DEBUG_CFLAGS) $(LIBS)
-release: *.[ch]
+release: *.[ch] libpcre2-32.a
$(CC) main.c -o ted $(RELEASE_CFLAGS) $(LIBS)
-profile: *.[ch]
+profile: *.[ch] libpcre2-32.a
$(CC) main.c -o ted $(PROFILE_CFLAGS) $(LIBS)
clean:
rm -f ted *.o
@@ -25,3 +25,10 @@ install: release
install -m 644 ted.cfg $(GLOBAL_DATA_DIR)
[ ! -e $(LOCAL_DATA_DIR)/ted.cfg ] && install -o `logname` -g `logname` -m 644 ted.cfg $(LOCAL_DATA_DIR) || :
install ted $(INSTALL_BIN_DIR)
+libpcre2-32.a: pcre2-10.36.zip
+ rm -rf pcre2-10.36
+ unzip $<
+ mkdir pcre2-10.36/build
+ cd pcre2-10.36/build && cmake -DPCRE2_BUILD_PCRE2_32=ON .. && $(MAKE) -j8
+ cp pcre2-10.36/build/$@ ./
+