tdv/Makefile

34 lines
724 B
Makefile
Raw Normal View History

2013-05-04 16:14:25 +02:00
SHELL = /bin/sh
2013-05-15 20:58:40 +02:00
pkgs = ncursesw glib-2.0 gio-2.0 pango
2013-05-05 04:45:47 +02:00
tests = test-stardict
2013-05-11 04:17:39 +02:00
targets = sdtui add-pronunciation $(tests)
2013-05-04 16:14:25 +02:00
CFLAGS = -ggdb -std=gnu99 -Wall -Wextra -Wno-missing-field-initializers \
`pkg-config --cflags $(pkgs)`
LDFLAGS = `pkg-config --libs $(pkgs)`
2013-05-05 04:45:47 +02:00
.PHONY: all clean test
2013-05-04 16:14:25 +02:00
all: $(targets)
clean:
2013-05-08 20:54:06 +02:00
rm -f $(targets) src/*.o
2013-05-04 16:14:25 +02:00
2013-05-11 04:17:39 +02:00
sdtui: src/sdtui.o src/stardict.o
2013-05-04 16:14:25 +02:00
$(CC) $^ -o $@ $(LDFLAGS)
add-pronunciation: src/add-pronunciation.o src/stardict.o src/generator.o
$(CC) $^ -o $@ $(LDFLAGS)
test-stardict: src/test-stardict.o src/stardict.o src/generator.o
2013-05-05 04:45:47 +02:00
$(CC) $^ -o $@ $(LDFLAGS)
test: $(tests)
for i in $(tests); do \
gtester --verbose ./$$i; \
done
2013-05-04 16:14:25 +02:00
%.o: %.c
$(CC) $(CFLAGS) -c $< -o $@