File: Makefile

package info (click to toggle)
hoz 1.65-3
  • links: PTS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 444 kB
  • sloc: ansic: 4,299; makefile: 148; sh: 48
file content (54 lines) | stat: -rwxr-xr-x 1,262 bytes parent folder | download
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54

CC = gcc

OBJ = hoz.o hozgtk.o hozgtk_c.o hozgtk_i.o hozgtk_s.o hozcli.o
LINKOBJ  = hoz.o hozcli.o
GLINKOBJ  = hoz.o hozgtk.o hozgtk_c.o hozgtk_i.o hozgtk_s.o
CFLAGS ?= -Wall -O2
#CFLAGS += -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED
BIN  = hoz
GBIN  = ghoz

GTK_COMP = `pkg-config gtk+-2.0 --cflags`
GTK_LINK = `pkg-config gtk+-2.0 --libs`


# `pkg-config gtk+-2.0 --cflags --libs`

.PHONY: all all-before all-after clean clean-custom cli gtk

all: all-before $(BIN) $(GBIN) all-after

cli: all-before ${BIN} all-after

gtk: all-before ${GBIN} all-after

clean: clean-custom
	rm -f $(OBJ)

distclean: clean-custom
	rm -f $(OBJ) ${BIN} ${GBIN}

hoz.o: hoz.c
	$(CC) -c hoz.c -o hoz.o $(CFLAGS)

hozgtk.o: hozgtk.c
	$(CC) -c hozgtk.c -o hozgtk.o $(CFLAGS) $(GTK_COMP)

hozgtk_c.o: hozgtk_c.c
	$(CC) -c hozgtk_c.c -o hozgtk_c.o $(CFLAGS) $(GTK_COMP) 

hozgtk_i.o: hozgtk_i.c
	$(CC) -c hozgtk_i.c -o hozgtk_i.o $(CFLAGS) $(GTK_COMP)

hozgtk_s.o: hozgtk_s.c
	$(CC) -c hozgtk_s.c -o hozgtk_s.o $(CFLAGS) $(GTK_COMP)

hozcli.o: hozcli.c
	$(CC) -c hozcli.c -o hozcli.o $(CFLAGS)

$(BIN): $(LINKOBJ)
	$(CC) $(LINKOBJ) -o $(BIN) $(LIBS)

$(GBIN): $(GLINKOBJ)
	$(CC) $(GLINKOBJ) -o $(GBIN) $(LIBS) $(GTK_LINK)