forked from OpenModelica/OMEdit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.omdev.mingw
42 lines (34 loc) · 1.34 KB
/
Makefile.omdev.mingw
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
ifeq ($(OMBUILDDIR),)
$(error OMBUILDDIR variable is not set.)
endif
buildbin=$(OMBUILDDIR)/bin
buildlib=$(OMBUILDDIR)/lib/omc
OMDEVMSYS=$(shell cygpath $$OMDEV)
all: omedit
CC = gcc
CXX = g++
CFLAGS = -O2 -falign-functions -fstack-protector-all
AR = ar
CMAKE = $(OMDEVMSYS)/bin/cmake/bin/cmake
CMAKE_TARGET = "MSYS Makefiles"
SHREXT=.dll
mkbuilddirs:
mkdir -p $(OMBUILDDIR)/share/omedit/nls
mkdir -p $(buildlib)
mkdir -p $(buildbin)
omedit: mkbuilddirs qjson-build
$(MAKE) -C OMEdit/OMEditGUI -f Makefile.omdev.mingw
cp -puf common/pre-commit.sh $(shell git rev-parse --git-dir)/hooks/pre-commit
clean:
cd qjson && rm -rf build
$(MAKE) -C OMEdit/OMEditGUI -f Makefile.omdev.mingw clean
qjson-build:
test -d qjson
mkdir -p qjson/build/include/qjson
(cd qjson/build && test -f Makefile || CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" $(CMAKE) -D CMAKE_AR:String="$(AR)" .. -DQT4_BUILD:Boolean=OFF -G $(CMAKE_TARGET) -DCMAKE_INSTALL_PREFIX:PATH=`pwd`)
test -f qjson/build/lib/libqjson$(SHREXT) || $(MAKE) -C qjson/build install
cp -a qjson/build/lib/libqjson*$(SHREXT)* $(OMBUILDDIR)/lib/omc/
cp -a qjson/build/bin/libqjson*$(SHREXT)* $(OMBUILDDIR)/lib/omc/
cp -a qjson/build/lib/libqjson*$(SHREXT)* $(OMBUILDDIR)/bin/
cp -a qjson/build/bin/libqjson*$(SHREXT)* $(OMBUILDDIR)/bin/
cp -a qjson/src/*.h qjson/build/include/qjson