1#
2#	Makefile for dcmpstat/apps
3#
4
5@SET_MAKE@
6
7SHELL = /bin/sh
8VPATH = @srcdir@:@top_srcdir@/include:@top_srcdir@/@configdir@/include
9srcdir = @srcdir@
10top_srcdir = @top_srcdir@
11configdir = @top_srcdir@/@configdir@
12
13include $(configdir)/@common_makefile@
14
15ofstddir = $(top_srcdir)/../ofstd
16ofstdinc = -I$(ofstddir)/include
17ofstdlibdir = -L$(ofstddir)/libsrc
18ofstdlib = -lofstd
19
20oflogdir = $(top_srcdir)/../oflog
21ofloginc = -I$(oflogdir)/include
22ofloglibdir = -L$(oflogdir)/libsrc
23ofloglib = -loflog
24
25dcmdatadir = $(top_srcdir)/../dcmdata
26dcmdatainc = -I$(dcmdatadir)/include
27dcmdatalibdir = -L$(dcmdatadir)/libsrc
28dcmdatalib = -ldcmdata
29
30dcmnetdir = $(top_srcdir)/../dcmnet
31dcmnetinc = -I$(dcmnetdir)/include
32dcmnetlibdir = -L$(dcmnetdir)/libsrc
33dcmnetlib = -ldcmnet
34
35dcmimgledir = $(top_srcdir)/../dcmimgle
36dcmimgleinc = -I$(dcmimgledir)/include
37dcmimglelibdir = -L$(dcmimgledir)/libsrc
38dcmimglelib = -ldcmimgle
39
40dcmimagedir = $(top_srcdir)/../dcmimage
41dcmimageinc = -I$(dcmimagedir)/include
42dcmimagelibdir = -L$(dcmimagedir)/libsrc
43dcmimagelib = -ldcmimage
44
45dcmpstatdir = $(top_srcdir)/../dcmpstat
46dcmpstatinc = -I$(dcmpstatdir)/include
47dcmpstatlibdir = -L$(dcmpstatdir)/libsrc
48dcmpstatlib = -ldcmpstat
49
50dcmqrdbdir = $(top_srcdir)/../dcmqrdb
51dcmqrdbinc = -I$(dcmqrdbdir)/include
52dcmqrdblibdir = -L$(dcmqrdbdir)/libsrc
53dcmqrdblib = -ldcmqrdb
54
55dcmtlsdir = $(top_srcdir)/../dcmtls
56dcmtlsinc = -I$(dcmtlsdir)/include
57dcmtlslibdir = -L$(dcmtlsdir)/libsrc
58dcmtlslib = -ldcmtls
59
60dcmsigndir = $(top_srcdir)/../dcmsign
61dcmsigninc = -I$(dcmsigndir)/include
62dcmsignlibdir = -L$(dcmsigndir)/libsrc
63dcmsignlib = -ldcmdsig
64
65dcmsrdir = $(top_srcdir)/../dcmsr
66dcmsrinc = -I$(dcmsrdir)/include
67dcmsrlibdir = -L$(dcmsrdir)/libsrc
68dcmsrlib = -ldcmsr
69
70LOCALINCLUDES = $(dcmpstatinc) $(ofstdinc) $(ofloginc) $(dcmnetinc) $(dcmdatainc) \
71	$(dcmimgleinc) $(dcmqrdbinc) $(dcmtlsinc) $(dcmsigninc) $(dcmsrinc)
72LIBDIRS = -L$(top_srcdir)/libsrc $(dcmpstatlibdir) $(dcmqrdblibdir) $(dcmnetlibdir) \
73	$(dcmtlslibdir) $(dcmsignlibdir) $(dcmsrlibdir) $(dcmdatalibdir) $(ofstdlibdir) \
74	$(ofloglibdir) $(dcmimglelibdir) $(dcmimagelibdir)
75LOCALLIBS = $(dcmpstatlib) $(dcmsignlib) $(dcmsrlib) $(dcmimagelib) $(dcmimglelib) \
76	$(dcmqrdblib) $(dcmnetlib) $(dcmtlslib) $(dcmdatalib) $(ofloglib) $(ofstdlib) \
77	$(TIFFLIBS) $(PNGLIBS) $(XMLLIBS) $(ZLIBLIBS) $(TCPWRAPPERLIBS) $(OPENSSLLIBS) \
78	$(CHARCONVLIBS) $(MATHLIBS)
79DCMMKLUT_LIBS = $(dcmimglelib) $(dcmdatalib) $(ofloglib) $(ofstdlib) $(XMLLIBS) \
80	$(ZLIBLIBS) $(CHARCONVLIBS) $(MATHLIBS)
81DCMMKCRV_LIBS = $(dcmdatalib) $(ofloglib) $(ofstdlib) $(XMLLIBS) $(ZLIBLIBS) \
82	$(CHARCONVLIBS) $(MATHLIBS)
83
84objs = dcmpsmk.o dcmp2pgm.o dcmmklut.o dcmmkcrv.o dcmpssnd.o dcmpsrcv.o dcmpsprt.o dcmprscu.o \
85	dcmprscp.o dcmpschk.o
86progs = dcmpsmk dcmp2pgm dcmmklut dcmmkcrv dcmpssnd dcmpsrcv dcmpsprt dcmprscu dcmprscp dcmpschk
87
88
89all: $(progs)
90
91dcmpsmk: dcmpsmk.o
92	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ dcmpsmk.o $(LOCALLIBS) $(LIBS)
93
94dcmp2pgm: dcmp2pgm.o
95	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ dcmp2pgm.o $(LOCALLIBS) $(LIBS)
96
97dcmmklut: dcmmklut.o
98	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ dcmmklut.o $(DCMMKLUT_LIBS) $(LIBS)
99
100dcmmkcrv: dcmmkcrv.o
101	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ dcmmkcrv.o $(DCMMKCRV_LIBS) $(LIBS)
102
103dcmpssnd: dcmpssnd.o
104	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ dcmpssnd.o $(LOCALLIBS) $(LIBS)
105
106dcmpsrcv: dcmpsrcv.o
107	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ dcmpsrcv.o $(LOCALLIBS) $(LIBS)
108
109dcmpsprt: dcmpsprt.o
110	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ dcmpsprt.o $(LOCALLIBS) $(LIBS)
111
112dcmprscu: dcmprscu.o
113	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ dcmprscu.o $(LOCALLIBS) $(LIBS)
114
115dcmprscp: dcmprscp.o
116	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ dcmprscp.o $(LOCALLIBS) $(LIBS)
117
118dcmpschk: dcmpschk.o
119	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ dcmpschk.o $(LOCALLIBS) $(LIBS)
120
121
122install: all
123	$(configdir)/mkinstalldirs $(DESTDIR)$(bindir)
124	for prog in $(progs); do \
125		$(INSTALL_PROGRAM) $$prog$(BINEXT) $(DESTDIR)$(bindir) && $(STRIP) $(DESTDIR)$(bindir)/$$prog$(BINEXT) ;\
126	done
127
128
129clean:
130	rm -f $(objs) $(progs) $(TRASH)
131
132distclean:
133	rm -f $(objs) $(progs) $(DISTTRASH)
134
135
136dependencies:
137	$(CXX) -MM $(defines) $(includes) $(CPPFLAGS) $(CXXFLAGS) *.cc  > $(DEP)
138
139include $(DEP)
140