summaryrefslogtreecommitdiff
path: root/saedit/Makefile
blob: ede29b1bd445fd29d5fa8f4749f4c555362c24c4 (plain) (blame)
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
ifndef CFLAGS
	CFLAGS = -O2 -pipe
endif

ifndef LDFLAGS
	LDFLAGS = 
endif

LDFLAGS += -export-dynamic

GTK_CFLAGS = `pkg-config --cflags gtk+-3.0 gtksourceview-3.0`
IBUS_CFLAGS = `pkg-config --cflags ibus-1.0`

GTK_LDFLAGS = `pkg-config --libs gtk+-3.0 gtksourceview-3.0`
IBUS_LDFLAGS = `pkg-config --libs ibus-1.0`

IBUS_FLAGS = ${IBUS_CFLAGS} ${IBUS_LDFLAGS}
GTK_FLAGS = ${GTK_CFLAGS} ${GTK_LDFLAGS}

OUTPUT = saedit
all:clean main.o search.o config.o xml.o sae.o compile
compile: main.o search.o config.o xml.o
	gcc ${CFLAGS} ${GTK_FLAGS} ${IBUS_FLAGS} ${LDFLAGS} -o '${OUTPUT}' main.o search.o config.o xml.o sae.o
main.o: main.c main.h search.h config.h common.h xml.h
	gcc ${CFLAGS} ${GTK_CFLAGS} ${IBUS_CFLAGS} -c -o main.o main.c
search.o: search.c search.h common.h
	gcc ${CFLAGS} ${GTK_CFLAGS} -c -o search.o search.c
xml.o: xml.c xml.h common.h
	gcc ${CFLAGS} ${IBUS_FLAGS} -c -o xml.o xml.c
config.o: config.c config.h common.h
	gcc ${CFLAGS} ${GTK_CFLAGS} ${IBUS_FLAGS} -c -o config.o config.c
sae.o: sae.c sae.h common.h
	gcc ${CFLAGS} ${GTK_CFLAGS} ${IBUS_CFLAGS} -c -o sae.o sae.c
clean:
	rm -rfv '${OUTPUT}' *.o *.o~ *.c~ *.h~