Makefile 777 Bytes
Newer Older
Jeroen Vreeken's avatar
Jeroen Vreeken committed
1
2
3
4

CFLAGS= -Wall -O3 
LDFLAGS= -lpthread

Jeroen Vreeken's avatar
Jeroen Vreeken committed
5
6
7
CFLAGS+=`pkg-config --cflags glib-2.0`
LDFLAGS+=`pkg-config --libs glib-2.0`

8
UTILSRCS= tcp_connect.c tcp_listen.c command_server.c status_server.c \
9
	config.c weather.c dt_model.c location.c dt_host.c
Jeroen Vreeken's avatar
Jeroen Vreeken committed
10
LIBUTILOBJS= $(UTILSRCS:.c=.lo)
Jeroen Vreeken's avatar
Jeroen Vreeken committed
11

Jeroen Vreeken's avatar
Jeroen Vreeken committed
12
all: $(LIBUTILOBJS) weather_test libutils.la libutils.la_install
Jeroen Vreeken's avatar
Jeroen Vreeken committed
13

14
libutils.la_LDFLAGS= -lm -rpath ${CURDIR}/../lib
Jeroen Vreeken's avatar
Jeroen Vreeken committed
15
16
libutils.la: $(LIBUTILOBJS)

17
18
${CURDIR}/../lib:
	@mkdir ${CURDIR}/../lib
Jeroen Vreeken's avatar
Jeroen Vreeken committed
19

20
libutils.la_install: libutils.la ${CURDIR}/../lib
Jeroen Vreeken's avatar
Jeroen Vreeken committed
21
	@echo "CP $^ to libdir"
22
	@${LIBTOOL} --quiet --mode=install install libutils.la ${CURDIR}/../lib
Jeroen Vreeken's avatar
Jeroen Vreeken committed
23
24
25
26

weather_test: weather_test.o weather.o tcp_connect.o

clean:
Jeroen Vreeken's avatar
Jeroen Vreeken committed
27
	rm -rf *.o *.a *.la *.lo .libs *.d weather_test
Jeroen Vreeken's avatar
Jeroen Vreeken committed
28
29
30
31

SRCS= $(UTILSRCS) weather_test.c

include ../build.mk