summaryrefslogtreecommitdiff
path: root/Makefile
blob: e354dffa3fec554b3446a4bd5b71c103a522e686 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
SHELL = /bin/sh

pkgs = ncursesw glib-2.0 gio-2.0
targets = sdcli

CC = clang
CFLAGS = -ggdb -std=gnu99 -Wall -Wextra -Wno-missing-field-initializers \
		 `pkg-config --cflags $(pkgs)`
LDFLAGS = `pkg-config --libs $(pkgs)`

.PHONY: all clean

all: $(targets)

clean:
	rm -f $(targets) *.o

sdcli: sdcli.o stardict.o
	$(CC) $^ -o $@ $(LDFLAGS)

%.o: %.c
	$(CC) $(CFLAGS) -c $< -o $@