summaryrefslogtreecommitdiffstats
path: root/Makefile
blob: e523530b1eb0807f4f68876e26471f4143df033b (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
#########################################################
#
# CSOAP Makefile
#
#########################################################

SHELL	= bash
CC	= gcc


VPATH	= . src

LIBNAME	= libsoap.a
EXLIB	= -L. -lsoap

SOURCE  = ${wildcard src/csoap*.c}
OBJECTS = $(addsuffix .o, $(basename $(SOURCE)))

CFLAGS	= `xml2-config --cflags` # -fwritable-strings
CLIBS	= `xml2-config --libs`

lib: $(OBJECTS)
	ar -rc $(LIBNAME) $(OBJECTS)

shared: $(OBJECTS)
	gcc --shared -o libsoap.dll $(OBJECTS) `xml2-config --libs`

example1: lib
	$(CC) -Isrc $(CFLAGS) ex1.c -o $@ $(EXLIB) $(CLIBS)

clean:
	-@rm -f src/*.o
	-@rm -f $(LIBNAME)
	-@rm -f *~
	-@rm -f src/*~