mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2026-02-04 05:44:53 +00:00
* feat: unpack gpac * fix: linux ci * fix: mac build * fix: remove unused [no ci] * fix: ignore config.h [no ci] * temp commit, will drop this soon * fix: install gpac * fix: gpac * fix: formatting * fix: preproccessor directive * fix: comment display version for now * fix: display dlls code * fix: bundle vcruntime in hardsubx windows * fix: again * fix: erros in ci * fix: ci * fix: add vcruntime in additional dependencies * fix: try to copy vcruntime after build * fix: space in runtime library * fix: remove for now [no ci] * fix: things in vcxproj * fix: ci for leptonica sys * fix: docs * fix: copy dlls on post build event * fix: copy vcruntime after build
58 lines
1.4 KiB
Makefile
58 lines
1.4 KiB
Makefile
SHELL = /bin/sh
|
|
|
|
CC=gcc
|
|
# SYS := $(shell gcc -dumpmachine)
|
|
CFLAGS=-O0 -std=gnu99 -D ENABLE_OCR -g -ggdb -rdynamic
|
|
#-Q -da -v
|
|
|
|
# enable COVERAGE
|
|
# CFLAGS+=-fprofile-arcs -ftest-coverage
|
|
|
|
# add debug flag
|
|
ifdef DEBUG
|
|
CFLAGS+=-DDEBUG
|
|
endif
|
|
|
|
#ALL_FLAGS = -Wno-write-strings -D_FILE_OFFSET_BITS=64 -DVERSION_FILE_PRESENT
|
|
LDFLAGS=-lm -g -lgpac
|
|
|
|
CFLAGS+=$(shell pkg-config --cflags check)
|
|
LDFLAGS+=$(shell pkg-config --libs check)
|
|
|
|
# TODO: need to rewrite this. Need new way to load sources for testing
|
|
OBJS=$(filter-out ../linux/objs/ccextractor.o, $(wildcard ../linux/objs/*.o))
|
|
|
|
SRC_SUITE=$(wildcard *_suite.c)
|
|
OBJ_SUITE=$(patsubst %_suite.c, %_suite.o, $(SRC_SUITE))
|
|
|
|
OBJS+=$(OBJ_SUITE)
|
|
|
|
all: clean test
|
|
|
|
%.o: %.c
|
|
# explicit output name : -o $@
|
|
$(CC) -c $(ALL_FLAGS) $(CFLAGS) $<
|
|
|
|
runtest: $(OBJS)
|
|
@echo "+----------------------------------------------+"
|
|
@echo "| BUILD TESTS |"
|
|
@echo "+----------------------------------------------+"
|
|
$(CC) -c $(ALL_FLAGS) $(CFLAGS) $@.c
|
|
$(CC) $@.o $^ $(ALL_FLAGS) $(CFLAGS) $(LDFLAGS) -o $@
|
|
|
|
.PHONY: test
|
|
test: runtest
|
|
@echo "+----------------------------------------------+"
|
|
@echo "| START TESTS |"
|
|
@echo "+----------------------------------------------+"
|
|
./runtest
|
|
|
|
.PHONY: clean
|
|
clean:
|
|
rm runtest || true
|
|
rm *.o || true
|
|
# coverage info
|
|
rm *.gcda || true
|
|
rm *.gcno || true
|
|
# debug info
|
|
rm *.c.* || true
|