Mercurial > forge
annotate main/fixed/src/Makefile @ 9929:df50d0ae107f octave-forge
Add HDF5 linking flags
author | jordigh |
---|---|
date | Fri, 30 Mar 2012 15:02:12 +0000 |
parents | d84d2fea3c90 |
children |
rev | line source |
---|---|
2383
d1930f8af7ca
Changed the directory structure of fixed to match the package system
hauberg
parents:
diff
changeset
|
1 sinclude Makeconf |
d1930f8af7ca
Changed the directory structure of fixed to match the package system
hauberg
parents:
diff
changeset
|
2 |
9929 | 3 HDF5_LIBS := $(shell grep "\#define OCTAVE_CONF_HDF5_LIBS" $(shell mkoctfile -p OCTINCLUDEDIR)/oct-conf.h | sed "s/^.*LIBS //" ) |
4 | |
2383
d1930f8af7ca
Changed the directory structure of fixed to match the package system
hauberg
parents:
diff
changeset
|
5 FIXEDVERTARGET = fixedversion.h |
d1930f8af7ca
Changed the directory structure of fixed to match the package system
hauberg
parents:
diff
changeset
|
6 FIXEDTARGET = fixed.oct |
d1930f8af7ca
Changed the directory structure of fixed to match the package system
hauberg
parents:
diff
changeset
|
7 |
3065
c9748be75a06
Implement symbol export mechanism similar to octave, for MSVC
goffioul
parents:
2745
diff
changeset
|
8 DLLDEF = |
4797 | 9 ADD_FLAGS = |
4418 | 10 ifneq (,$(findstring cygwin,$(canonical_host_type))) |
11 DLLDEF = -DFIXED_DLL | |
4797 | 12 ADD_FLAGS = -Wl,--out-implib=libfixed.a |
4418 | 13 endif |
14 ifneq (,$(findstring mingw,$(canonical_host_type))) | |
15 DLLDEF = -DFIXED_DLL | |
4797 | 16 ADD_FLAGS = -Wl,--out-implib=libfixed.a |
4418 | 17 endif |
18 ifneq (,$(findstring msdosmsvc,$(canonical_host_type))) | |
19 DLLDEF = -DFIXED_DLL | |
2383
d1930f8af7ca
Changed the directory structure of fixed to match the package system
hauberg
parents:
diff
changeset
|
20 endif |
d1930f8af7ca
Changed the directory structure of fixed to match the package system
hauberg
parents:
diff
changeset
|
21 |
4631 | 22 FIXEDSOURCES = fixedColVector.cc fixedRowVector.cc \ |
2383
d1930f8af7ca
Changed the directory structure of fixed to match the package system
hauberg
parents:
diff
changeset
|
23 fixedMatrix.cc fixedComplex.cc fixedCColVector.cc fixedCRowVector.cc \ |
d1930f8af7ca
Changed the directory structure of fixed to match the package system
hauberg
parents:
diff
changeset
|
24 fixedCMatrix.cc Array-f.cc fixed-conv.cc ov-fixed.cc ov-fixed-mat.cc \ |
d1930f8af7ca
Changed the directory structure of fixed to match the package system
hauberg
parents:
diff
changeset
|
25 fixedNDArray.cc fixedCNDArray.cc \ |
d1930f8af7ca
Changed the directory structure of fixed to match the package system
hauberg
parents:
diff
changeset
|
26 ov-fixed-complex.cc ov-fixed-cx-mat.cc \ |
d1930f8af7ca
Changed the directory structure of fixed to match the package system
hauberg
parents:
diff
changeset
|
27 op-fs-fs.cc op-fs-fm.cc op-fm-fs.cc op-fm-fm.cc \ |
d1930f8af7ca
Changed the directory structure of fixed to match the package system
hauberg
parents:
diff
changeset
|
28 op-fs-fcs.cc op-fs-fcm.cc op-fm-fcs.cc op-fm-fcm.cc \ |
d1930f8af7ca
Changed the directory structure of fixed to match the package system
hauberg
parents:
diff
changeset
|
29 op-fcs-fs.cc op-fcs-fm.cc op-fcm-fs.cc op-fcm-fm.cc \ |
d1930f8af7ca
Changed the directory structure of fixed to match the package system
hauberg
parents:
diff
changeset
|
30 op-fcs-fcs.cc op-fcs-fcm.cc op-fcm-fcs.cc op-fcm-fcm.cc \ |
d1930f8af7ca
Changed the directory structure of fixed to match the package system
hauberg
parents:
diff
changeset
|
31 fixed-var.cc fixed.cc |
9481 | 32 FIXEDOBJECTS = int/fixed.o $(patsubst %.cc,%.o,$(FIXEDSOURCES)) |
33 FIXEDDEPENDS = int/fixed.d $(patsubst %.cc,%.d,$(FIXEDSOURCES)) | |
2383
d1930f8af7ca
Changed the directory structure of fixed to match the package system
hauberg
parents:
diff
changeset
|
34 |
4631 | 35 TARGETS = $(FIXEDTARGET) |
36 OBJECTS = $(FIXEDOBJECTS) | |
2383
d1930f8af7ca
Changed the directory structure of fixed to match the package system
hauberg
parents:
diff
changeset
|
37 |
d1930f8af7ca
Changed the directory structure of fixed to match the package system
hauberg
parents:
diff
changeset
|
38 ifeq ($(MAKECMDGOALS),all) |
d1930f8af7ca
Changed the directory structure of fixed to match the package system
hauberg
parents:
diff
changeset
|
39 DEPENDS = $(FIXEDDEPENDS) |
d1930f8af7ca
Changed the directory structure of fixed to match the package system
hauberg
parents:
diff
changeset
|
40 endif |
d1930f8af7ca
Changed the directory structure of fixed to match the package system
hauberg
parents:
diff
changeset
|
41 ifeq ($(MAKECMDGOALS),) |
d1930f8af7ca
Changed the directory structure of fixed to match the package system
hauberg
parents:
diff
changeset
|
42 DEPENDS = $(FIXEDDEPENDS) |
d1930f8af7ca
Changed the directory structure of fixed to match the package system
hauberg
parents:
diff
changeset
|
43 endif |
d1930f8af7ca
Changed the directory structure of fixed to match the package system
hauberg
parents:
diff
changeset
|
44 |
4631 | 45 DELETES = $(OBJECTS) $(FIXEDDEPENDS) $(TARGETS) $(FIXEDVERTARGET) \ |
46 core octave-core *~ *.d-t int/fixed.o int/fixed.d \ | |
2745
4b4fbe3a7c2b
Get rid of redundant build code. Fixes build issue on Solaris
adb014
parents:
2400
diff
changeset
|
47 int/fixed.d-t FILES |
2383
d1930f8af7ca
Changed the directory structure of fixed to match the package system
hauberg
parents:
diff
changeset
|
48 |
4631 | 49 DEFINES = -DOCTAVE_FORGE $(DLLDEF) |
2383
d1930f8af7ca
Changed the directory structure of fixed to match the package system
hauberg
parents:
diff
changeset
|
50 MOFLAGS = |
d1930f8af7ca
Changed the directory structure of fixed to match the package system
hauberg
parents:
diff
changeset
|
51 |
2745
4b4fbe3a7c2b
Get rid of redundant build code. Fixes build issue on Solaris
adb014
parents:
2400
diff
changeset
|
52 .PHONY: all clean count |
2383
d1930f8af7ca
Changed the directory structure of fixed to match the package system
hauberg
parents:
diff
changeset
|
53 |
d1930f8af7ca
Changed the directory structure of fixed to match the package system
hauberg
parents:
diff
changeset
|
54 .SUFFIXES: |
d1930f8af7ca
Changed the directory structure of fixed to match the package system
hauberg
parents:
diff
changeset
|
55 |
d1930f8af7ca
Changed the directory structure of fixed to match the package system
hauberg
parents:
diff
changeset
|
56 .PRECIOUS: %.d %.o |
d1930f8af7ca
Changed the directory structure of fixed to match the package system
hauberg
parents:
diff
changeset
|
57 |
2745
4b4fbe3a7c2b
Get rid of redundant build code. Fixes build issue on Solaris
adb014
parents:
2400
diff
changeset
|
58 all : $(TARGETS) |
4b4fbe3a7c2b
Get rid of redundant build code. Fixes build issue on Solaris
adb014
parents:
2400
diff
changeset
|
59 @if [ -f FILES ]; then \ |
4b4fbe3a7c2b
Get rid of redundant build code. Fixes build issue on Solaris
adb014
parents:
2400
diff
changeset
|
60 $(RM) -f FILES; \ |
4b4fbe3a7c2b
Get rid of redundant build code. Fixes build issue on Solaris
adb014
parents:
2400
diff
changeset
|
61 fi; \ |
4b4fbe3a7c2b
Get rid of redundant build code. Fixes build issue on Solaris
adb014
parents:
2400
diff
changeset
|
62 touch FILES; \ |
4b4fbe3a7c2b
Get rid of redundant build code. Fixes build issue on Solaris
adb014
parents:
2400
diff
changeset
|
63 for _f in $(TARGETS); do \ |
4b4fbe3a7c2b
Get rid of redundant build code. Fixes build issue on Solaris
adb014
parents:
2400
diff
changeset
|
64 echo $$_f >> FILES; \ |
4b4fbe3a7c2b
Get rid of redundant build code. Fixes build issue on Solaris
adb014
parents:
2400
diff
changeset
|
65 done |
2383
d1930f8af7ca
Changed the directory structure of fixed to match the package system
hauberg
parents:
diff
changeset
|
66 |
d1930f8af7ca
Changed the directory structure of fixed to match the package system
hauberg
parents:
diff
changeset
|
67 ifndef OCTAVE_FORGE |
d1930f8af7ca
Changed the directory structure of fixed to match the package system
hauberg
parents:
diff
changeset
|
68 install : |
d1930f8af7ca
Changed the directory structure of fixed to match the package system
hauberg
parents:
diff
changeset
|
69 @echo "Where exactly do you want me to install to!!!" |
d1930f8af7ca
Changed the directory structure of fixed to match the package system
hauberg
parents:
diff
changeset
|
70 else |
2745
4b4fbe3a7c2b
Get rid of redundant build code. Fixes build issue on Solaris
adb014
parents:
2400
diff
changeset
|
71 install : |
2383
d1930f8af7ca
Changed the directory structure of fixed to match the package system
hauberg
parents:
diff
changeset
|
72 @$(INSTALL) -d $(DESTDIR)$(MPATH)/fixed |
3359
4f23e9c5957a
merge octave_fixed.dll into fixed.oct to avoid installing files (DLL) outside of the normal package directory [Win32/MSVC]
goffioul
parents:
3065
diff
changeset
|
73 |
4f23e9c5957a
merge octave_fixed.dll into fixed.oct to avoid installing files (DLL) outside of the normal package directory [Win32/MSVC]
goffioul
parents:
3065
diff
changeset
|
74 $(FIXEDOBJECTS) $(FIXEDDEPENDS): DEFINES := $(DEFINES) $(DLLDEF) |
2383
d1930f8af7ca
Changed the directory structure of fixed to match the package system
hauberg
parents:
diff
changeset
|
75 endif |
d1930f8af7ca
Changed the directory structure of fixed to match the package system
hauberg
parents:
diff
changeset
|
76 |
d1930f8af7ca
Changed the directory structure of fixed to match the package system
hauberg
parents:
diff
changeset
|
77 $(FIXEDTARGET) : $(DEPENDS) $(FIXEDOBJECTS) |
9481 | 78 @echo "Linking $@"; |
9929 | 79 $(MKOCTFILE) $(ADD_FLAGS) $(MOFLAGS) $(FIXEDOBJECTS) $(EXTRALIBS) $(HDF5_LIBS) -o $@ |
2383
d1930f8af7ca
Changed the directory structure of fixed to match the package system
hauberg
parents:
diff
changeset
|
80 |
d1930f8af7ca
Changed the directory structure of fixed to match the package system
hauberg
parents:
diff
changeset
|
81 $(FIXEDVERTARGET) : |
9481 | 82 @echo "Creating $@"; $(RM) -f $@; |
2383
d1930f8af7ca
Changed the directory structure of fixed to match the package system
hauberg
parents:
diff
changeset
|
83 echo "#define OCTAVEFIXEDVERSION \"$(OCTAVEFIXEDVERSION)\"" > $@ |
d1930f8af7ca
Changed the directory structure of fixed to match the package system
hauberg
parents:
diff
changeset
|
84 |
d1930f8af7ca
Changed the directory structure of fixed to match the package system
hauberg
parents:
diff
changeset
|
85 ifneq (,$(DEPENDS)) |
d1930f8af7ca
Changed the directory structure of fixed to match the package system
hauberg
parents:
diff
changeset
|
86 sinclude $(DEPENDS) |
d1930f8af7ca
Changed the directory structure of fixed to match the package system
hauberg
parents:
diff
changeset
|
87 endif |
d1930f8af7ca
Changed the directory structure of fixed to match the package system
hauberg
parents:
diff
changeset
|
88 |
9481 | 89 int/fixed.d : int/fixed.cc |
90 @echo "Depending $<"; | |
91 $(MKOCTFILE) $(MOFLAGS) $(DEFINES) -M int/fixed.cc; | |
2383
d1930f8af7ca
Changed the directory structure of fixed to match the package system
hauberg
parents:
diff
changeset
|
92 |
d1930f8af7ca
Changed the directory structure of fixed to match the package system
hauberg
parents:
diff
changeset
|
93 fixed-var.d : $(FIXEDVERTARGET) |
d1930f8af7ca
Changed the directory structure of fixed to match the package system
hauberg
parents:
diff
changeset
|
94 |
9481 | 95 int/fixed.o : int/fixed.cc int/fixed.d |
96 @echo "Compiling $@ from $<" | |
97 $(MKOCTFILE) $(MOFLAGS) $(DEFINES) -c -o $@ $< | |
2383
d1930f8af7ca
Changed the directory structure of fixed to match the package system
hauberg
parents:
diff
changeset
|
98 |
d1930f8af7ca
Changed the directory structure of fixed to match the package system
hauberg
parents:
diff
changeset
|
99 %.d: %.cc |
9481 | 100 @echo "Depending $<" |
2383
d1930f8af7ca
Changed the directory structure of fixed to match the package system
hauberg
parents:
diff
changeset
|
101 $(MKOCTFILE) $(MOFLAGS) $(DEFINES) -M $< |
d1930f8af7ca
Changed the directory structure of fixed to match the package system
hauberg
parents:
diff
changeset
|
102 |
d1930f8af7ca
Changed the directory structure of fixed to match the package system
hauberg
parents:
diff
changeset
|
103 %.o:%.cc |
d1930f8af7ca
Changed the directory structure of fixed to match the package system
hauberg
parents:
diff
changeset
|
104 %.o:%.cc %.d |
9481 | 105 @echo "Compiling $@" |
2383
d1930f8af7ca
Changed the directory structure of fixed to match the package system
hauberg
parents:
diff
changeset
|
106 $(MKOCTFILE) $(MOFLAGS) $(DEFINES) -c $< |
d1930f8af7ca
Changed the directory structure of fixed to match the package system
hauberg
parents:
diff
changeset
|
107 |
2745
4b4fbe3a7c2b
Get rid of redundant build code. Fixes build issue on Solaris
adb014
parents:
2400
diff
changeset
|
108 clean: |
9481 | 109 @echo "Cleaning..." |
2383
d1930f8af7ca
Changed the directory structure of fixed to match the package system
hauberg
parents:
diff
changeset
|
110 $(RM) -f $(DELETES) |
d1930f8af7ca
Changed the directory structure of fixed to match the package system
hauberg
parents:
diff
changeset
|
111 |
2745
4b4fbe3a7c2b
Get rid of redundant build code. Fixes build issue on Solaris
adb014
parents:
2400
diff
changeset
|
112 realclean: |
9481 | 113 @echo "Cleaning..." |
4632 | 114 $(RM) -f $(DELETES) Makeconf config.log config.status |
2383
d1930f8af7ca
Changed the directory structure of fixed to match the package system
hauberg
parents:
diff
changeset
|
115 |
2745
4b4fbe3a7c2b
Get rid of redundant build code. Fixes build issue on Solaris
adb014
parents:
2400
diff
changeset
|
116 dist: |
2383
d1930f8af7ca
Changed the directory structure of fixed to match the package system
hauberg
parents:
diff
changeset
|
117 |
2745
4b4fbe3a7c2b
Get rid of redundant build code. Fixes build issue on Solaris
adb014
parents:
2400
diff
changeset
|
118 count: |
2383
d1930f8af7ca
Changed the directory structure of fixed to match the package system
hauberg
parents:
diff
changeset
|
119 wc *{.cc,.h,.m} int/*.{cc,h} |