forked from bridgecommand/bc
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
60 lines (51 loc) · 2.81 KB
/
Copy pathMakefile
File metadata and controls
60 lines (51 loc) · 2.81 KB
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
# Bridge Command 5.0 Makefile, based on Makefiles for Irrlicht Examples
# It's usually sufficient to change just the target name and source file list
# and be sure that CXX is set to a valid compiler
# Name of the executable created (.exe will be added automatically if necessary)
Target := bridgecommand
# List of source files, separated by spaces
Sources := main.cpp Angles.cpp Buoy.cpp Buoys.cpp Camera.cpp GUIMain.cpp IniFile.cpp LandLights.cpp LandObject.cpp LandObjects.cpp Lang.cpp Light.cpp MyEventReceiver.cpp NavLight.cpp Network.cpp NetworkPrimary.cpp NetworkSecondary.cpp NMEA.cpp OtherShip.cpp OtherShips.cpp OwnShip.cpp RadarCalculation.cpp RadarScreen.cpp Rain.cpp RealisticWater.cpp ScenarioChoice.cpp Ship.cpp SimulationModel.cpp Sky.cpp StartupEventReceiver.cpp Terrain.cpp Tide.cpp Utilities.cpp Water.cpp libs/enet/callbacks.c libs/enet/compress.c libs/enet/host.c libs/enet/list.c libs/enet/packet.c libs/enet/peer.c libs/enet/protocol.c libs/enet/unix.c libs/enet/win32.c libs/serial/src/impl/list_ports/list_ports_linux.cc libs/serial/src/impl/list_ports/list_ports_osx.cc libs/serial/src/impl/list_ports/list_ports_win.cc libs/serial/src/impl/unix.cc libs/serial/src/impl/win.cc libs/serial/src/serial.cc
# Path to Irrlicht directory, should contain include/ and lib/
IrrlichtHome := ./libs/Irrlicht/irrlicht-1.8.1
# Path for the executable. Note that Irrlicht.dll should usually also be there for win32 systems
BinPath = .
# general compiler settings (might need to be set when compiling the lib, too)
# preprocessor flags, e.g. defines and include paths
USERCPPFLAGS = -I./libs/enet/enet-1.3.11/include
# compiler flags such as optimization flags
USERCXXFLAGS = -O3 -ffast-math
#USERCXXFLAGS = -g -Wall
# linker flags such as additional libraries and link paths
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Darwin)
USERLDFLAGS = -L./libs/Irrlicht/irrlicht-1.8.1/source/Irrlicht/MacOSX/build/Release -lIrrlicht -L/usr/X11R6/lib$(LIBSELECT) -framework OpenGL -framework Cocoa -framework IOKit -framework CoreVideo
else
USERLDFLAGS = -L$(IrrlichtHome)/lib/Linux -lIrrlicht -L/usr/X11R6/lib$(LIBSELECT) -lGL -lXxf86vm -lXext -lX11 -lXcursor
endif
####
#no changes necessary below this line
####
CPPFLAGS = -I$(IrrlichtHome)/include -I/usr/X11R6/include $(USERCPPFLAGS)
CXXFLAGS = $(USERCXXFLAGS)
LDFLAGS = $(USERLDFLAGS)
# name of the binary - only valid for targets which set SYSTEM
DESTPATH = $(BinPath)/$(Target)$(SUF)
#default target is Linux
all:
$(warning Building...)
$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS)
ifeq ($(UNAME_S),Darwin)
cp $(DESTPATH) BridgeCommand.app/Contents/MacOS/BridgeCommand
endif
clean:
$(warning Cleaning...)
@$(RM) $(DESTPATH)
.PHONY: all
#multilib handling
ifeq ($(HOSTTYPE), x86_64)
LIBSELECT=64
endif
#solaris real-time features
ifeq ($(HOSTTYPE), sun4)
LDFLAGS += -lrt
endif