summaryrefslogtreecommitdiff
path: root/Makefile
blob: 0b69a3c15f58359cc97be1fd476183975d7889aa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
CC=gcc
CFLAGS=-Wall -g `pkg-config --cflags gtk+-2.0`
LDLIBS=`pkg-config --libs gtk+-2.0`

wordextract: main.o interface.o callbacks.o dict.o srt.o engparser.o word.o
	$(CC) $(LDLIBS) main.o interface.o callbacks.o dict.o srt.o engparser.o word.o -o wordextract

main.o: main.c interface.h dict.h srt.h subtitle.h
	$(CC) $(CFLAGS) -c main.c

interface.o: interface.c interface.h
	$(CC) $(CFLAGS) -c interface.c

callbacks.o: callbacks.c callbacks.h
	$(CC) $(CFLAGS) -c callbacks.c

dict.o: dict.c dict.h
	$(CC) $(CFLAGS) -c dict.c

srt.o: srt.c srt.h subtitle.h engparser.h
	$(CC) $(CFLAGS) -c srt.c

enrparser.o: engparser.c engparser.h word.h
	$(CC) $(CFLAGS) -c engparser.c

word.o: word.c word.h
	$(CC) $(CFLAGS) -c word.c

install: wordextract
	cp wordextract /usr/bin

uninstall:
	rm -f /usr/bin/wordextract

clean:
	rm -f wordextract
	rm -f *.o