summaryrefslogtreecommitdiffstats
path: root/examples/xsd2c/ex3/Makefile
blob: faffe7775aabe7768403dabfe33124d3fece7cda (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
#########################################################
#
# XSD2C Examles Makefile
#
#########################################################

SHELL	= bash
CC	= gcc


VPATH	= . ../

EXECNAME= ex3.exe
XSDFILE = ex3.xsd
EXSRC	= ex3.c utils.c
GENSRC	= Person_xsd.c Customer_xsd.c

EXOBJ	= $(addsuffix .o, $(basename $(EXSRC)))
GENOBJ	= $(addsuffix .o, $(basename $(GENSRC)))
OBJECTS =  $(EXOBJ) $(GENOBJ) 
XSD2C	= ../../xsd2c

$(EXECNAME): stubs  $(GENSRC) $(OBJECTS) 
	$(CC) -g $(CFLAGS) -o $@ $(OBJECTS) $(CLIBS)

CFLAGS	= `xml2-config --cflags`
CLIBS	= `xml2-config --libs`


stubs:
	$(XSD2C)  -S $(XSDFILE) 

clean:
	-@rm -f *.o
	-@rm -f *_xsd.h
	-@rm -f *_xsd.c
	-@rm -f *~
	-@rm -f $(EXECNAME)