Skip to content

Commit 4cd2000

Browse files
committed
Fixed OMPlot & qwt compilation for Windows.
1 parent 95a869d commit 4cd2000

File tree

5 files changed

+48
-10
lines changed

5 files changed

+48
-10
lines changed

Makefile.omdev.mingw

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
ifeq ($(OMBUILDDIR),)
2+
$(error OMBUILDDIR variable is not set.)
3+
endif
4+
5+
builddir_inc=$(OMBUILDDIR)/include
6+
buildbin=$(OMBUILDDIR)/bin
7+
buildlib=$(OMBUILDDIR)/lib/omc
8+
9+
bindir = @bindir@
10+
bindir = @includedir@
11+
libdir = @libdir@/@host_short@/omc
12+
13+
omplot: mkbuilddirs qwt
14+
$(MAKE) -C OMPlot/OMPlotGUI -f Makefile.omdev.mingw
15+
16+
$(buildlib)/libomqwt.a: mkbuilddirs qwt-build
17+
18+
qwt: $(buildlib)/libomqwt.a
19+
20+
qwt-build: mkbuilddirs
21+
$(MAKE) -C qwt -f Makefile.omdev.mingw
22+
23+
mkbuilddirs:
24+
mkdir -p $(builddir_inc)/omplot/qwt
25+
mkdir -p $(buildlib)
26+
mkdir -p $(buildbin)
27+
28+
clean:
29+
$(MAKE) -C qwt -f Makefile.omdev.mingw clean
30+
$(MAKE) -C OMPlot/OMPlotGUI -f Makefile.omdev.mingw clean

OMPlot/OMPlotGUI/Makefile.omdev.mingw

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
OMBUILDDIR=../../../OMCompiler/build
1+
ifeq ($(OMBUILDDIR),)
2+
$(error OMBUILDDIR variable is not set.)
3+
endif
24

35
QMAKE=qmake
46
EXE=.exe

OMPlot/OMPlotGUI/OMPlotGUI.pro

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ HEADERS += Plot.h \
2727
win32 {
2828
QMAKE_LFLAGS += -enable-auto-import
2929
CONFIG(debug, debug|release){
30-
LIBS += -L../../../OMCompiler/build/lib/omc -lOMPlot -lomqwtd
30+
LIBS += -L$$(OMBUILDDIR)/lib/omc -lOMPlot -lomqwtd
3131
}
3232
else {
33-
LIBS += -L../../../OMCompiler/build/lib/omc -lOMPlot -lomqwt
33+
LIBS += -L$$(OMBUILDDIR)/lib/omc -lOMPlot -lomqwt
3434
}
35-
INCLUDEPATH += ../../../OMCompiler/build/include/omc/qwt ../../../OMCompiler/build/include/omc/c
35+
INCLUDEPATH += $$(OMBUILDDIR)/include/omplot/qwt $$(OMBUILDDIR)/include/omc/c
3636
} else {
3737
include(OMPlotGUI.config)
3838
LIBS += -lOMPlot

OMPlot/OMPlotGUI/OMPlotLib.pro

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@ HEADERS += Plot.h \
4141

4242
win32 {
4343
CONFIG(debug, debug|release){
44-
LIBS += -L../../../OMCompiler/build/lib/omc -lomqwtd
44+
LIBS += -L$$(OMBUILDDIR)/lib/omc -lomqwtd
4545
}
4646
else {
47-
LIBS += -L../../../OMCompiler/build/lib/omc -lomqwt
47+
LIBS += -L$$(OMBUILDDIR)/lib/omc -lomqwt
4848
}
49-
INCLUDEPATH += ../../../OMCompiler/build/include/omc/qwt ../../../OMCompiler/build/include/omc/c
49+
INCLUDEPATH += $$(OMBUILDDIR)/include/omplot/qwt $$(OMBUILDDIR)/include/omc/c
5050
} else {
5151
include(OMPlotGUI.config)
5252
}

qwt/Makefile.omdev.mingw

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
# @author Adeel Asghar <adeel.asghar@liu.se>
22
#
33

4+
ifeq ($(OMBUILDDIR),)
5+
$(error OMBUILDDIR variable is not set.)
6+
endif
7+
8+
builddir_inc=$(OMBUILDDIR)/include
9+
buildlib=$(OMBUILDDIR)/lib/omc
10+
411
QMAKE=qmake
512
NAME=qwt
613

@@ -22,6 +29,5 @@ $(NAME): Makefile
2229
$(MAKE) -f Makefile
2330

2431
build: $(NAME)
25-
$(MAKE) -f Makefile install
26-
cp -puf lib/libomqwt*.a ../../OMCompiler/build/lib/omc
27-
cp -puf build/include/* ../../OMCompiler/build/include/omc/qwt
32+
cp -puf lib/libomqwt*.a $(buildlib)
33+
test -f $(builddir_inc)/omplot/qwt/qwt_global.h || ($(MAKE) -f Makefile install && cp -a build/include/*.h $(builddir_inc)/omplot/qwt)

0 commit comments

Comments
 (0)