tdv/Makefile

32 lines
573 B
Makefile
Raw Normal View History

2013-05-04 16:14:25 +02:00
SHELL = /bin/sh
pkgs = ncursesw glib-2.0 gio-2.0
2013-05-05 04:45:47 +02:00
tests = test-stardict
targets = sdcli $(tests)
2013-05-04 16:14:25 +02:00
CC = clang
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:
rm -f $(targets) *.o
sdcli: sdcli.o stardict.o
$(CC) $^ -o $@ $(LDFLAGS)
2013-05-05 04:45:47 +02:00
test-stardict: test-stardict.o stardict.o
$(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 $@