summaryrefslogtreecommitdiff
path: root/src/GNUmakefile
blob: 2044e944e468eb75d692c9b13144a29d4cada158 (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
38
39
40
41
42
43
44
45
46
47
48
49
50
TOPDIR = ..

SUBDIRS =

INCLUDE_DIRS = -I$(TOPDIR)/include/wolf -I.

BINS =

LIBS = libwolf.a

PORT_OBJS = \
	port/string.o \
	port/lockf.o \
	port/snprintf.o

COMMON_OBJS = \
	log.o

DAEMON_OBJS = \
	daemon/signals.o \
	daemon/pidfile.o \
	daemon/daemon.o

OBJS = \
	$(PORT_OBJS) \
	$(COMMON_OBJS) \
	$(DAEMON_OBJS)

local_all: $(LIBS)

-include $(TOPDIR)/makefiles/gmake/sub.mk

# snprintf has some quirks, compile relaxed
port/snprintf.o : port/snprintf.c port/snprintf.h
	$(CC) -c -o $@ $(INCLUDE_DIRS) $<

libwolf.a: $(OBJS)
	$(AR) cr $@ $?

local_clean:
	-@rm -f port/*.bak
	-@rm -f port/*~
	-@rm -f port/*.d
	-@rm -f libwolf.a

local_distclean:

local_install:
	$(INSTALL) -d -m 755 $(libdir)/wolf
	$(INSTALL) -m 644 libwolf.a $(libdir)/wolf