Makefile.mingw 3.88 KB
Newer Older
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
###########################################################################
#   Copyright (C) 2008 by Oliver Bock                                     #
#   oliver.bock[AT]aei.mpg.de                                             #
#                                                                         #
#   This file is part of Einstein@Home.                                   #
#                                                                         #
#   Einstein@Home is free software: you can redistribute it and/or modify #
#   it under the terms of the GNU General Public License as published     #
#   by the Free Software Foundation, version 2 of the License.            #
#                                                                         #
#   Einstein@Home is distributed in the hope that it will be useful,      #
#   but WITHOUT ANY WARRANTY; without even the implied warranty of        #
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the          #
#   GNU General Public License for more details.                          #
#                                                                         #
#   You should have received a copy of the GNU General Public License     #
#   along with Einstein@Home. If not, see <http://www.gnu.org/licenses/>. #
#                                                                         #
###########################################################################

# path settings
FRAMEWORK_SRC?=$(PWD)
FRAMEWORK_INSTALL?=$(PWD)

# config values
CXX?=g++
27
TARGET_HOST?=i586-pc-mingw32
28
29

# variables
30
CPPFLAGS += $(shell $(FRAMEWORK_INSTALL)/bin/sdl-config --cflags)
31
CPPFLAGS += $(shell $(FRAMEWORK_INSTALL)/bin/freetype-config --cflags)
32
CPPFLAGS += $(shell $(FRAMEWORK_INSTALL)/bin/xml2-config --cflags)
Oliver Bock's avatar
Oliver Bock committed
33
CPPFLAGS += -I$(FRAMEWORK_INSTALL)/include/boinc -I$(FRAMEWORK_INSTALL)/include
Oliver Bock's avatar
Oliver Bock committed
34
CPPFLAGS += -D_WIN32_WINDOWS=0x0410
35
36

DEPS = Makefile
37
OBJS = AbstractGraphicsEngine.o GraphicsEngineFactory.o WindowManager.o Resource.o ResourceFactory.o BOINCClientAdapter.o Libxml2Adapter.o
38
39
40
41
42
43
44
45
46
47
48
49

# TODO: GraphicsEngineFactory obviously depends on the actual implementations (here starsphere)! need to change the structure! what about plugins?
CPPFLAGS += -I$(FRAMEWORK_SRC) -I$(FRAMEWORK_SRC)/../starsphere

# primary role based tagets
default: release
debug: libframework.a
memcheck: clean debug
callgrind: clean debug
release: clean libframework.a

# target specific options
50
51
debug: CPPFLAGS += -pg -gstabs3 -O0 -Wall -Wno-switch-enum
release: CPPFLAGS += -DNDEBUG -gstabs3 -O3 -Wall -Wno-switch-enum
52
53
54
55

# file based targets
libframework.a: $(OBJS)
	ar rcs libframework.a $(OBJS)
56
	$(TARGET_HOST)-ranlib libframework.a
57
58
59

AbstractGraphicsEngine.o: $(DEPS) $(FRAMEWORK_SRC)/AbstractGraphicsEngine.cpp $(FRAMEWORK_SRC)/AbstractGraphicsEngine.h
	$(CXX) -g ${CPPFLAGS} -c $(FRAMEWORK_SRC)/AbstractGraphicsEngine.cpp
60

61
62
GraphicsEngineFactory.o: $(DEPS) $(FRAMEWORK_SRC)/GraphicsEngineFactory.cpp $(FRAMEWORK_SRC)/GraphicsEngineFactory.h
	$(CXX) -g ${CPPFLAGS} -c $(FRAMEWORK_SRC)/GraphicsEngineFactory.cpp
63

64
65
WindowManager.o: $(DEPS) $(FRAMEWORK_SRC)/WindowManager.cpp $(FRAMEWORK_SRC)/WindowManager.h
	$(CXX) -g ${CPPFLAGS} -c $(FRAMEWORK_SRC)/WindowManager.cpp
66

67
68
BOINCClientAdapter.o: $(DEPS) $(FRAMEWORK_SRC)/BOINCClientAdapter.cpp $(FRAMEWORK_SRC)/BOINCClientAdapter.h
	$(CXX) -g ${CPPFLAGS} -c $(FRAMEWORK_SRC)/BOINCClientAdapter.cpp
69

70
71
ResourceFactory.o: $(DEPS) $(FRAMEWORK_SRC)/ResourceFactory.cpp $(FRAMEWORK_SRC)/ResourceFactory.h
	$(CXX) -g ${CPPFLAGS} -c $(FRAMEWORK_SRC)/ResourceFactory.cpp
72

73
74
75
Resource.o: $(DEPS) $(FRAMEWORK_SRC)/Resource.cpp $(FRAMEWORK_SRC)/Resource.h
	$(CXX) -g ${CPPFLAGS} -c $(FRAMEWORK_SRC)/Resource.cpp

76
77
78
Libxml2Adapter.o: $(DEPS) $(FRAMEWORK_SRC)/Libxml2Adapter.cpp $(FRAMEWORK_SRC)/Libxml2Adapter.h $(FRAMEWORK_SRC)/XMLProcessorInterface.h
	$(CXX) -g ${CPPFLAGS} -c $(FRAMEWORK_SRC)/Libxml2Adapter.cpp

79
80
81
82
83
84
# tools
install:
	cp libframework.a $(ORC_INSTALL)/lib

clean:
	rm -f $(OBJS) libframework.a