-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
36 lines (24 loc) · 988 Bytes
/
Makefile
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
include config.mk
default: all
BLDDIR = `pwd`
CFLAGS = -lpthread
# If this were a real application, working from an installed copy of
# Xmlrpc-c, XMLRPC_C_CONFIG would just be 'xmlrpc-c-config'. It would be
# found in the user's PATH.
XMLRPC_C_CONFIG = $(BLDDIR)/xmlrpc-c-config.test
# Build up PROGS:
PROGS = xmlrpc_transfer_server xmlrpc_transfer_client
OBJECTS = xmlrpc_transfer.o xmlrpc_transfer_server.o xmlrpc_transfer_client.o
INCLUDES = -I. $(shell $(XMLRPC_C_CONFIG) client abyss-server --cflags)
LIBS_LINKING = -L. $(shell $(XMLRPC_C_CONFIG) client abyss-server --libs)
all: $(PROGS)
# When building in separate tree, directory won't exist yet
xmlrpc_transfer_client: xmlrpc_transfer_client.o xmlrpc_transfer.o
$(CCLD) -o $@ $^ $(LIBS_LINKING) -g $(CFLAGS)
xmlrpc_transfer_server: xmlrpc_transfer_server.o xmlrpc_transfer.o
$(CCLD) -o $@ $^ $(LIBS_LINKING) -g $(CFLAGS)
$(OBJECTS):*.c *.h
$(CC) -g -c $^ $(INCLUDES)
.PHONY: clean
clean:
rm -f $(PROGS) *.o *.gch