summaryrefslogtreecommitdiffstats
path: root/cpgx/Makefile
blob: 596e03e18267706822ffa7c36fcf68d9ae2570ae (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

CFLAGS := -Wall -g

OPENAIS_CPG := $(wildcard /usr/include/openais/cpg.h)
ifneq ($(strip $(OPENAIS_CPG)),)
CFLAGS += -DWHITETANK
ARCHM=$(shell uname -m)
ifeq (x86_64,$(ARCHM))
LDFLAGS += -L/usr/lib64/openais
else
LDFLAGS := -L/usr/lib/openais
endif
endif

VER=$(shell cat VERSION)
CFLAGS += -DVERSION=\"$(VER)\"

all: cpgx

cpgx:	cpgx.o
	gcc $(LDFLAGS) -o $@ $^ -lcpg

cpgx.o:	cpgx.c
	gcc $(CFLAGS) -c -o $@ $<

clean:
	rm -f *.o cpgx

install: all
	install -D cpgx $(DESTDIR)/usr/bin