File: Makefile

package info (click to toggle)
dpuser 3.3%2Bp1%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 8,776 kB
  • ctags: 6,249
  • sloc: cpp: 80,284; ansic: 6,606; lex: 1,618; makefile: 881; yacc: 662; sh: 25
file content (756 lines) | stat: -rw-r--r-- 29,540 bytes parent folder | download
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
################################################################################
# dpuser Makefile
################################################################################
# Type one of the following lines:
#   make                    same as 'make release'
#   make release            (static, 32/64-bit autodetect)
#   make release_shared     WIN only (shared, 32/64-bit autodetect)
#   make debug              (static, 32/64-bit autodetect)
#   make debug_shared       WIN only (shared, 32/64-bit autodetect)
#   make CYGWIN=-y          WIN only, target for CYGWIN-environment
#   make clean              to clean up the project
#   make revision           creates the revision-string
#   make dist               LINUX/MACOSX only to create a distribution as
#                           tar.gz-file, calls automatically the revision-target
#                           (do a checkout to a new location before, since all
#                           .svn-folders will be deleted!)
#
#
#   make parsers PLATFORM=LINUX (or MACOSX or WIN)
#                          to create just the parsers and lexxers for dpuser,
#                          dpuser2c & idl2c
#   make dpuser2c_header PLATFORM=LINUX (or MACOSX or WIN)
#                          to create just the dpuser2c.h-file
#
# In dpuser a static target means that all libraries and functionality is linked
# statically into the created binary.
# A shared target means that some dpuser-functionality is moved to a dll
# (external libraries are still linked statically).
#
################################################################################
RM          ?= rm -f
SED         ?= sed
CC          ?= gcc
CXX         ?= g++
LINK        = g++
QF          =
CYGWIN      =

PGPLOT      = -DHAS_PGPLOT
DPPGPLOT    =

DEFINES     = $(PGPLOT) $(DPPGPLOT) -D$(OS)
ifeq ($(QF), -qt)
   DEFINES  += -DDPQT -DNO_READLINE
endif
ifeq ($(CYGWIN), -y)
   DEFINES  += -DCYGWIN
endif

CFLAGS      += $(CPPFLAGS) -D_REENTRANT $(DEFINES)
CXXFLAGS    += $(CPPFLAGS) -D_REENTRANT $(DEFINES)
INCPATH     = -I. -I../utils -I../libfits -Iparser -I.

DLL_OBJECTS = utils.o \
              dpuser_utils.o \
              dpuser.procs.o \
              eso.o \
              functions.o \
              tools.o \
              y.dpuser2c.o \
              y.idl2c.o \
              lex.dpuser2c.o \
              lex.idl2c.o \
              procedures.o \
              dpuserType.o \
              dpstring.o \
              dpstringlist.o \
              regex_sr.o \
              mpfit.o \
              3d_stuff.o \
              cube.o \
              dpheader.o \
              fits.o \
              fits_cube.o \
              fits_dpl.o \
              fits_exc.o \
              fits_file.o \
              fits_filters.o \
              fits_funcs.o \
              fits_mem.o \
              fits_ops.o \
              fits_procs.o \
              fits_range.o \
              fits_red.o \
              JulianDay.o \
              math_utils.o \
              platform.o \
              dpComplex.o \
              fitting.o \
              voronoi.o \
              fits_logic.o \
              astrolib.o \
              primes.o

ifeq ($(PGPLOT), -DHAS_PGPLOT)
   ifeq ($(DPPGPLOT), -DHAS_DPPGPLOT)
      DLL_OBJECTS += cpg3d.o
   endif
endif

EXE_OBJECTS = dpuser.o \
              dpuser.yacchelper.o \
              dpuser_funcs.o \
              y.tab.o \
              dpuser.input.o \
              dpuser.pgplot.o \
              lex.yy.o \
              svn_revision.o \
              misc.o

################################################################################
# Platform-specific defines

ifeq ($(HOMEDRIVE), C:)
   OS             = WIN
   RM             = del
   SED_INPLACE    = ../bin/WIN/sed.exe -i
   
   # didn't manage to do this as onliner like in the unix-case, pipe doesn't work...
   REV_NR := $(shell svnversion -c ..)
   $(shell @echo $(REV_NR) > _bbb.txt)
   REV_NR := $(shell sed -e 's/[MS]//g' -e 's/^[[:digit:]]*://' _bbb.txt)
   $(shell del _bbb.txt)

   ifndef $(ARCH)
   # didn't manage to do this as onliner like in the unix-case, pipe doesn't work...
      ARCH := $(shell wmic os get osarchitecture)
      $(shell @echo $(ARCH) > _bbb.txt)
      ARCH := $(shell sed  -e "s/OSArchitecture//g" -e "s/ //g" -e "s/-bit//g" -e "s/-Bit//g" _bbb.txt)
      $(shell del _bbb.txt)
   endif

   DEFINES  += -DHAVE_MINGW32
   
   ifeq ($(CYGWIN), -y)
      LIBS     = /usr/lib/libreadline.a \
                 /usr/lib/libncurses.a \
                 ../lib/WIN32.cygwin/libgsl.a

      DLL_LIBS = ../lib/WIN32.cygwin/libgsl.a \
                 ../lib/WIN32.cygwin/libgslcblas.a \
                 ../lib/WIN32.cygwin/librfftw.a \
                 ../lib/WIN32.cygwin/libfftw.a \
                 ../lib/WIN32.cygwin/libcpgplot.a \
                 ../lib/WIN32.cygwin/libpgplot.a \
                 /usr/lib/libz.a \
                 /usr/lib/libpng.a \
                 ../lib/WIN32.cygwin/libxpa.a \
                 -lg2c \
                 -lgdi32
   else
      LIBS     = ../lib/$(OS)$(ARCH)/libgsl.a \
                 ../lib/$(OS)$(ARCH)/libreadline.a \
                 ../lib/$(OS)$(ARCH)/libtermcap.a

      DLL_LIBS = ../lib/$(OS)$(ARCH)/libgsl.a \
                 ../lib/$(OS)$(ARCH)/libgslcblas.a \
                 ../lib/$(OS)$(ARCH)/librfftw.a \
                 ../lib/$(OS)$(ARCH)/libfftw.a \
                 ../lib/$(OS)$(ARCH)/libcpgplot.a \
                 ../lib/$(OS)$(ARCH)/libpgplot.a \
                 ../lib/$(OS)$(ARCH)/libz.a \
                 ../lib/$(OS)$(ARCH)/libpng.a \
                 ../lib/$(OS)$(ARCH)/libxpa.a \
                 ../lib/$(OS)$(ARCH)/libf2c.a \
                 -lgdi32 \
                 -lws2_32
				 
      LDFLAG      =
   endif
	
   DEL_STRING     = 2d
else
   REV_NR := $(shell svnversion -c .. | sed -e 's/[MS]//g' -e 's/^[[:digit:]]*://')

   ifeq ($(shell uname -m), x86_64)
      ARCH = 64
   else
      ARCH = 32
   endif

   ifeq ($(TERM_PROGRAM), Apple_Terminal)
      OS          = MACOSX
      ifeq ($(ARCH), 32)
         LDFLAG      = -arch i386
         CXXFLAGS    := -arch i386 $(CXXFLAGS)
      else
         # -arch x86_64
         LDFLAG      = 
      endif
      SED_INPLACE = sed -i ''
      LIBS        = ../lib/$(OS)$(ARCH)/libxpa.a \
                    ../lib/$(OS)$(ARCH)/librfftw.a \
                    ../lib/$(OS)$(ARCH)/libfftw.a \
                    ../lib/$(OS)$(ARCH)/libcpgplot.a \
                    ../lib/$(OS)$(ARCH)/libpgplot.a \
                    ../lib/$(OS)$(ARCH)/libpng.a \
                    ../lib/$(OS)$(ARCH)/libgsl.a \
                    ../lib/$(OS)$(ARCH)/libgslcblas.a \
                    ../lib/$(OS)$(ARCH)/libreadline.a \
                    ../lib/$(OS)$(ARCH)/libz.a \
                    ../lib/$(OS)$(ARCH)/libncurses.a \
                    ../lib/$(OS)$(ARCH)/libf2c.a \
                    -L/opt/X11/lib \
                    -lX11

   else
      OS          = LINUX
      LDFLAG      =
      SED_INPLACE = sed -i''
      LIBS        = -rdynamic \
		     -lcpgplot \
		     -lxpa \
		     -lrfftw \
		     -lfftw \
		     -lgsl \
		     -lgslcblas \
		     -ldl \
		     -lz \
		     -lreadline \
                    -ldl -lpthread

   endif
   TARDIR     := $(shell echo $(PWD) | sed 's|/dpuser$$||g' | sed 's|\/.*\/||g')
   DEL_STRING = '2d'
endif

################################################################################
# main targets
all: release

##### RELEASE TARGETS #####
ifeq ($(OS), WIN) # start WIN
ifeq ($(CYGWIN), -y)
release:
	$(MAKE) static "TARGET_WIN = dpuserCyg.exe"
release_shared:
	$(MAKE) all_dp "TARGET_WIN = dpuserCyg.exe" "TARGET_DLL = dpuserCyg.dll"
else
release:
	$(MAKE) static "TARGET_WIN = dpuser.exe"
release_shared:
	$(MAKE) all_dp "TARGET_WIN = dpuser.exe" "TARGET_DLL = dpuser.dll"
endif # end WIN
else # start LINUX & MACOSX
release:
	$(MAKE) static "TARGET_LINUX = dpuser"
endif # end LINUX & MACOSX

##### DEBUG TARGETS #####
ifeq ($(OS), WIN) # start WIN
ifeq ($(CYGWIN), -y)
debug:
	$(MAKE) static "TARGET_WIN = dpuserCygD.exe" "CFLAGS = $(CFLAGS) -g -DDBG" "CXXFLAGS = $(CXXFLAGS) -g -DDBG"
debug_shared:
	$(MAKE) shared "TARGET_WIN = dpuserCygD.exe" "TARGET_DLL = dpuserCygD.dll" "CFLAGS = $(CFLAGS) -g -DDBG" "CXXFLAGS = $(CXXFLAGS) -g -DDBG"
else
debug:
	$(MAKE) static "TARGET_WIN = dpuserD.exe" "CFLAGS = $(CFLAGS) -g -DDBG" "CXXFLAGS = $(CXXFLAGS) -g -DDBG"
debug_shared:
	$(MAKE) shared "TARGET_WIN = dpuserD.exe" "TARGET_DLL = dpuserD.dll" "CFLAGS = $(CFLAGS) -g -DDBG" "CXXFLAGS = $(CXXFLAGS) -g -DDBG"
endif # end WIN
else # start LINUX & MACOSX
debug:
	$(MAKE) static "TARGET_LINUX = dpuserD" "CFLAGS = $(CFLAGS) -g -DDBG" "CXXFLAGS = $(CXXFLAGS) -g -DDBG"
endif # end LINUX & MACOSX

################################################################################
# sub targets

ifeq ($(OS), WIN) # start WIN
static: revision dpuser2c_header parsers $(DLL_OBJECTS) $(EXE_OBJECTS)
	$(LINK) $(LDFLAG) -static -static-libgcc -static-libstdc++ -Wl,--enable-runtime-pseudo-reloc -o $(TARGET_WIN) $(DLL_OBJECTS) $(EXE_OBJECTS) $(DLL_LIBS) $(LIBS)
shared: revision dpuser2c_header parsers
	$(MAKE) $(MULTIPROZGEIL) $(TARGET_DLL)
	$(MAKE) $(MULTIPROZGEIL) $(TARGET_WIN)
else # end WIN, start LINUX & MACOSX
static: revision dpuser2c_header parsers
	$(MAKE) $(MULTIPROZGEIL) $(TARGET_LINUX)
endif # end LINUX & MACOSX

$(TARGET_DLL): $(DLL_OBJECTS)
	g++ -shared -o $(TARGET_DLL) $(DLL_OBJECTS) $(DLL_LIBS)

$(TARGET_WIN): $(EXE_OBJECTS)
	$(LINK) -Wl,--enable-runtime-pseudo-reloc -o $(TARGET_WIN) $(EXE_OBJECTS) $(LIBS) $(TARGET_DLL)

$(TARGET_LINUX): $(DLL_OBJECTS) $(EXE_OBJECTS)
	$(LINK) $(LDFLAG) -o $(TARGET_LINUX) $(DLL_OBJECTS) $(EXE_OBJECTS) $(LDFLAGS) $(LIBS)

# creates dpuser2c.h
dpuser2c_header:
	$(MAKE) -C dpuser2c header PLATFORM=$(OS)

# Builds parser-, dpuser2c & idl2c-source-files
parsers: parsers_qf
	$(MAKE) -C parser PLATFORM=$(OS)

parsers_qf:
	$(MAKE) -C dpuser2c PLATFORM=$(OS)
	$(MAKE) -C idl2c PLATFORM=$(OS)

clean: clean_qf
	-$(RM) $(EXE_OBJECTS)
	-$(RM) $(DLL_OBJECTS)
	$(if $(OS:WIN=), \
		-$(RM) dpuser dpuserD \
	, \
		-$(RM) dpuser.exe dpuserD.exe dpuserCyg.exe dpuserCygD.exe \
		-$(RM) dpuser.dll dpuserD.dll dpuserCyg.dll dpuserCygD.dll\
	)

# this target is called by QFitsView 'make clean'
clean_qf: FORCE
	$(MAKE) -C parser clean  PLATFORM=$(OS)
	$(MAKE) -C dpuser2c clean PLATFORM=$(OS)
	$(MAKE) -C idl2c clean PLATFORM=$(OS)

FORCE:

################################################################################
# Updates the revision in parser/svn_revision.h
revision:
ifeq ($(OS), WIN)
	echo #include "svn_revision.h" > parser/svn_revision.cpp
	echo. >> parser/svn_revision.cpp
	echo char* GetRevString() { return "Rev. $(REV_NR)"; } >> parser/svn_revision.cpp
else
	@echo '#include "svn_revision.h"' > parser/svn_revision_new.cpp; \
	echo '' >> parser/svn_revision_new.cpp; \
	echo 'char* GetRevString() { return "Rev. $(REV_NR)"; }' >> parser/svn_revision_new.cpp; \
	cmp -s parser/svn_revision.cpp parser/svn_revision_new.cpp; \
	RETVAL=$$?; \
	if [ $$RETVAL -ne 0 ]; then \
		mv parser/svn_revision_new.cpp parser/svn_revision.cpp; \
	fi
endif
	@echo "Revision number: "$(REV_NR)


################################################################################
# Creates a distribution
ifeq ($(OS), WIN) # start WIN
dist:
	@echo "*************************************************************"
	@echo "ERROR: Distribution can only be generated under LINUX or MAC!"
	@echo "*************************************************************"
else # end WIN, start LINUX & MACOSX
dist: clean
	cd ../QFitsView && make -i clean
	make revision
	find .. -type d -name ".svn" -exec rm -rf {} +
	find .. -type d -name "obsolete" -exec rm -rf {} +
	find .. -regextype posix-extended -regex '.*\.(a|lib|dll|exe)' -exec rm {} +
	rm -rf ../include/*
	rm -rf ../bin/*
	rm -rf ../external/*z
	tar cfvz ../../dpuser-r$(REV_NR).tar.gz ../../$(TARDIR)
endif # end LINUX & MACOSX

################################################################################
# Compile rules
dpuser.o:              dpuser.cpp \
                       dpuser.h \
                       dpuser.yacchelper.h \
                       dpuser.procs.h \
                       dpuser.pgplot.h \
                       dpuser_funcs.h \
                       dpuser_utils.h \
                       dpuser2c/dpuserType.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o dpuser.o dpuser.cpp

dpuser.input.o:        dpuser.input.cpp \
                       dpuser.h \
                       dpuser2c/tools.h \
                       dpuser2c/dpuserType.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o dpuser.input.o dpuser.input.cpp

dpuser.pgplot.o:       dpuser.pgplot.cpp \
                       dpuser.h \
                       dpuser.pgplot.h \
                       dpuser.procs.h \
                       dpuser_utils.h \
                       dpuser.yacchelper.h \
                       dpuser_funcs.h \
                       dpuser2c/dpuserType.h \
                       dpuser2c/procedures.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o dpuser.pgplot.o dpuser.pgplot.cpp

dpuser.procs.o:        dpuser.procs.cpp \
                       dpuser.h \
                       dpuser_funcs.h \
                       dpuser_utils.h \
                       dpuser.pgplot.h \
                       dpuser2c/dpuserType.h \
                       dpuser2c/procedures.h \
                       doc/help.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o dpuser.procs.o dpuser.procs.cpp

dpuser.yacchelper.o:    dpuser.yacchelper.cpp \
                        dpuser.h \
                        dpuser_funcs.h \
                        dpuser.pgplot.h \
                        dpuser_utils.h \
                        dpuser2c/dpuserType.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o dpuser.yacchelper.o dpuser.yacchelper.cpp

dpuser_funcs.o:         dpuser_funcs.cpp \
                        dpuser.h \
                        dpuser_funcs.h \
                        dpuser.pgplot.h \
                        dpuser_utils.h \
                        dpuser.yacchelper.h \
                        dpuser2c/dpuserType.h \
                        dpuser2c/functions.h \
                        ../libfits/dpComplex.h \
                        ../libfits/defines.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o dpuser_funcs.o dpuser_funcs.cpp

dpuser_utils.o:         dpuser_utils.cpp \
                        dpuser_utils.h \
                        dpuser2c/utils.h \
                        dpuser.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o dpuser_utils.o dpuser_utils.cpp

lex.yy.o:               parser/lex.yy.cpp \
                        dpuser.h \
                        dpuser.yacchelper.h \
                        dpuser.pgplot.h \
                        dpuser_funcs.h \
                        dpuser_utils.h \
                        dpuser2c/dpuserType.h \
                        parser/y.tab.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o lex.yy.o parser/lex.yy.cpp

y.tab.o:                parser/y.tab.cpp \
                        dpuser.h \
                        dpuser.yacchelper.h \
                        dpuser.procs.h \
                        dpuser.pgplot.h \
                        dpuser_funcs.h \
                        dpuser_utils.h \
                        dpuser2c/dpuserType.h \
                        parser/svn_revision.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o y.tab.o parser/y.tab.cpp

svn_revision.o:         parser/svn_revision.cpp \
                        parser/svn_revision.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o svn_revision.o parser/svn_revision.cpp

dpuserType.o:           dpuser2c/dpuserType.cpp \
                        dpuser.h \
                        dpuser_utils.h \
                        dpuser2c/dpuserType.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o dpuserType.o dpuser2c/dpuserType.cpp

utils.o:                dpuser2c/utils.cpp \
                        dpuser.h \
                        dpuser_funcs.h \
                        dpuser2c/dpuserType.h \
                        dpuser2c/utils.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o utils.o dpuser2c/utils.cpp

eso.o:                  dpuser2c/eso.cpp \
                        dpuser2c/eso.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o eso.o dpuser2c/eso.cpp

functions.o:            dpuser2c/functions.cpp \
                        dpuser.h \
                        dpuser_utils.h \
                        dpuser.yacchelper.h \
                        dpuser_funcs.h \
                        dpuser2c/functions.h \
                        dpuser2c/dpuserType.h \
                        dpuser2c/utils.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o functions.o dpuser2c/functions.cpp

procedures.o:           dpuser2c/procedures.cpp \
                        dpuser.h \
                        dpuser_utils.h \
                        dpuser.procs.h \
                        dpuser.yacchelper.h \
                        dpuser2c/procedures.h \
                        dpuser2c/dpuserType.h \
                        dpuser2c/functions.h \
                        dpuser2c/utils.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o procedures.o dpuser2c/procedures.cpp

y.dpuser2c.o:           dpuser2c/y.dpuser2c.cpp \
                        dpuser.h \
                        dpuser2c/tools.h \
                        dpuser2c/dpuserType.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o y.dpuser2c.o dpuser2c/y.dpuser2c.cpp

lex.dpuser2c.o:         dpuser2c/lex.dpuser2c.cpp \
                        dpuser.h \
                        dpuser_utils.h \
                        dpuser2c/tools.h \
                        dpuser2c/dpuserType.h \
                        dpuser2c/y.tab.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o lex.dpuser2c.o dpuser2c/lex.dpuser2c.cpp

y.idl2c.o:              idl2c/y.idl2c.cpp \
                        dpuser.h \
                        dpuser2c/tools.h \
                        dpuser2c/dpuserType.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o y.idl2c.o idl2c/y.idl2c.cpp

lex.idl2c.o:            idl2c/lex.idl2c.cpp \
                        dpuser.h \
                        dpuser_utils.h \
                        dpuser2c/tools.h \
                        dpuser2c/dpuserType.h \
                        idl2c/y.tab.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o lex.idl2c.o idl2c/lex.idl2c.cpp

tools.o:                dpuser2c/tools.cpp \
                        dpuser.h \
                        dpuser_funcs.h \
                        dpuser2c/tools.h \
                        dpuser2c/dpuserType.h \
                        dpuser2c/dpuser2c.h \
                        dpuser2c/functions.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o tools.o dpuser2c/tools.cpp

cpg3d.o:                ../utils/cpg3d.c 
	$(CC) -c $(CXXFLAGS) $(INCPATH) -o cpg3d.o ../utils/cpg3d.c

dpstring.o:             ../utils/dpstring.cpp \
                        ../utils/dpstring.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o dpstring.o ../utils/dpstring.cpp

dpstringlist.o:         ../utils/dpstringlist.cpp \
                        ../utils/dpstringlist.h \
                        ../utils/dpstring.h \
                        ../utils/osdir/osdir.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o dpstringlist.o ../utils/dpstringlist.cpp

regex_sr.o:            ../utils/regex/regex_sr.cpp \
                       ../utils/regex/regex_sr.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o regex_sr.o ../utils/regex/regex_sr.cpp

mpfit.o:               ../utils/cmpfit/mpfit.c \
                       ../utils/cmpfit/mpfit.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o mpfit.o ../utils/cmpfit/mpfit.c

3d_stuff.o:             ../libfits/3d_stuff.cpp \
                        dpuser_utils.h \
                        dpuser.h \
                        ../libfits/fits.h \
                        ../libfits/dpComplex.h \
                        ../libfits/defines.h \
                        ../libfits/math_utils.h \
                        ../libfits/platform.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o 3d_stuff.o ../libfits/3d_stuff.cpp

cube.o:                 ../libfits/cube.c \
                        ../libfits/cube.h
	$(CC) -c $(CXXFLAGS) $(INCPATH) -o cube.o ../libfits/cube.c

dpheader.o:             ../libfits/dpheader.cpp \
                        dpuser_utils.h \
                        dpuser.h \
                        ../libfits/fits.h \
                        ../libfits/dpComplex.h \
                        ../libfits/defines.h \
                        ../libfits/math_utils.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o dpheader.o ../libfits/dpheader.cpp

fits.o:                 ../libfits/fits.cpp \
                        dpuser_utils.h \
                        dpuser.h \
                        ../libfits/fits.h \
                        ../libfits/dpComplex.h \
                        ../libfits/defines.h \
                        ../libfits/math_utils.h \
                        ../libfits/platform.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o fits.o ../libfits/fits.cpp

fits_cube.o:            ../libfits/fits_cube.cpp \
                        dpuser_utils.h \
                        dpuser.h \
                        ../libfits/platform.h \
                        ../libfits/fits.h \
                        ../libfits/dpComplex.h \
                        ../libfits/defines.h \
                        ../libfits/math_utils.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o fits_cube.o ../libfits/fits_cube.cpp

fits_dpl.o:             ../libfits/fits_dpl.cpp \
                        dpuser_utils.h \
                        dpuser.h \
                        ../libfits/fits.h \
                        ../libfits/dpComplex.h \
                        ../libfits/defines.h \
                        ../libfits/math_utils.h \
                        ../libfits/cube.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o fits_dpl.o ../libfits/fits_dpl.cpp

fits_exc.o:             ../libfits/fits_exc.cpp \
                        dpuser_utils.h \
                        dpuser.h \
                        ../libfits/fits.h \
                        ../libfits/dpComplex.h \
                        ../libfits/defines.h \
                        ../libfits/math_utils.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o fits_exc.o ../libfits/fits_exc.cpp

fits_file.o:            ../libfits/fits_file.cpp \
                        dpuser_utils.h \
                        dpuser.h \
                        ../libfits/fits.h \
                        ../libfits/platform.h \
                        ../libfits/dpComplex.h \
                        ../libfits/defines.h \
                        ../libfits/math_utils.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o fits_file.o ../libfits/fits_file.cpp

fits_filters.o:         ../libfits/fits_filters.cpp \
                        dpuser_utils.h \
                        dpuser.h \
                        ../libfits/fits.h \
                        ../libfits/dpComplex.h \
                        ../libfits/defines.h \
                        ../libfits/math_utils.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o fits_filters.o ../libfits/fits_filters.cpp

fits_funcs.o:           ../libfits/fits_funcs.cpp \
                        dpuser_utils.h \
                        dpuser.h \
                        ../libfits/fits.h \
                        ../libfits/dpComplex.h \
                        ../libfits/defines.h \
                        ../libfits/math_utils.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o fits_funcs.o ../libfits/fits_funcs.cpp

fits_mem.o:             ../libfits/fits_mem.cpp \
                        dpuser_utils.h \
                        dpuser.h \
                        ../libfits/fits.h \
                        ../libfits/dpComplex.h \
                        ../libfits/defines.h \
                        ../libfits/math_utils.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o fits_mem.o ../libfits/fits_mem.cpp

fits_ops.o:             ../libfits/fits_ops.cpp \
                        dpuser_utils.h \
                        dpuser.h \
                        ../libfits/fits.h \
                        ../libfits/dpComplex.h \
                        ../libfits/defines.h \
                        ../libfits/math_utils.h \
                        ../libfits/platform.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o fits_ops.o ../libfits/fits_ops.cpp

fits_procs.o:           ../libfits/fits_procs.cpp \
                        dpuser_utils.h \
                        dpuser.h \
                        ../libfits/fits.h \
                        ../libfits/dpComplex.h \
                        ../libfits/defines.h \
                        ../libfits/math_utils.h \
                        ../libfits/platform.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o fits_procs.o ../libfits/fits_procs.cpp

fits_range.o:           ../libfits/fits_range.cpp \
                        dpuser_utils.h \
                        dpuser.h \
                        ../libfits/fits.h \
                        ../libfits/dpComplex.h \
                        ../libfits/defines.h \
                        ../libfits/math_utils.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o fits_range.o ../libfits/fits_range.cpp

fits_red.o:             ../libfits/fits_red.cpp \
                        dpuser_utils.h \
                        dpuser.h \
                        ../libfits/fits.h \
                        ../libfits/dpComplex.h \
                        ../libfits/defines.h \
                        ../libfits/math_utils.h \
                        ../libfits/fitting.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o fits_red.o ../libfits/fits_red.cpp

JulianDay.o:            ../libfits/JulianDay.cpp \
                        ../libfits/JulianDay.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o JulianDay.o ../libfits/JulianDay.cpp

math_utils.o:           ../libfits/math_utils.cpp \
                        dpuser_utils.h \
                        dpuser.h \
                        ../libfits/fits.h \
                        ../libfits/dpComplex.h \
                        ../libfits/defines.h \
                        ../libfits/math_utils.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o math_utils.o ../libfits/math_utils.cpp

misc.o:                 ../libfits/misc.c 
	$(CC) -c $(CXXFLAGS) $(INCPATH) -o misc.o ../libfits/misc.c

platform.o:             ../libfits/platform.cpp \
                        ../libfits/platform.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o platform.o ../libfits/platform.cpp

dpComplex.o:            ../libfits/dpComplex.cpp \
                        ../libfits/dpComplex.h \
                        ../libfits/defines.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o dpComplex.o ../libfits/dpComplex.cpp

fitting.o:              ../libfits/fitting.cpp \
                        dpuser_utils.h \
                        dpuser.h \
                        ../libfits/fits.h \
                        ../libfits/fitting.h \
                        ../libfits/dpComplex.h \
                        ../libfits/defines.h \
                        ../libfits/math_utils.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o fitting.o ../libfits/fitting.cpp

voronoi.o:              ../libfits/voronoi.cpp \
                        dpuser_utils.h \
                        dpuser.h \
                        ../libfits/fits.h \
                        ../libfits/dpComplex.h \
                        ../libfits/defines.h \
                        ../libfits/math_utils.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o voronoi.o ../libfits/voronoi.cpp

fits_logic.o:           ../libfits/fits_logic.cpp \
                        dpuser_utils.h \
                        dpuser.h \
                        ../libfits/fits.h \
                        ../libfits/dpComplex.h \
                        ../libfits/defines.h \
                        ../libfits/math_utils.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o fits_logic.o ../libfits/fits_logic.cpp

astrolib.o:             ../libfits/functions/astrolib/astrolib.cpp \
                        dpuser_utils.h \
                        dpuser.h \
                        ../libfits/functions/astrolib/astrolib.h \
                        ../libfits/fits.h \
                        ../libfits/dpComplex.h \
                        ../libfits/defines.h \
                        ../libfits/math_utils.h \
                        ../libfits/fitting.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o astrolib.o ../libfits/functions/astrolib/astrolib.cpp

primes.o:               ../libfits/functions/astrolib/primes.cpp \
                        dpuser_utils.h \
                        dpuser.h \
                        ../libfits/fits.h \
                        ../libfits/dpComplex.h \
                        ../libfits/defines.h \
                        ../libfits/math_utils.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o primes.o ../libfits/functions/astrolib/primes.cpp