forked from jamilan/VersionControlPlugins
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.osx
70 lines (49 loc) · 2.11 KB
/
Makefile.osx
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
61
62
63
64
65
66
67
68
69
70
include Makefile.srcs
CC = gcc
CXX = g++
AR = ar
# CXXFLAGS = -O3 -arch i386 -g
CXXFLAGS = -arch i386 -g
LIBRARIES = -lstdc++
PLATFORM = OSXi386
COMMON_MODULES = $(COMMON_SRCS:.c=.o)
COMMON_MODULES := $(COMMON_MODULES:.cpp=.o)
TESTSERVER_MODULES = $(TESTSERVER_SRCS:.c=.o)
TESTSERVER_MODULES := $(TESTSERVER_SRCS:.cpp=.o)
TESTSERVER_TARGET= Build/$(PLATFORM)/TestServer
P4PLUGIN_MODULES = $(P4PLUGIN_SRCS:.c=.o)
P4PLUGIN_MODULES := $(P4PLUGIN_MODULES:.cpp=.o)
P4PLUGIN_TARGET = PerforcePlugin
SVNPLUGIN_MODULES = $(SVNPLUGIN_SRCS:.c=.o)
SVNPLUGIN_MODULES := $(SVNPLUGIN_MODULES:.cpp=.o)
SVNPLUGIN_TARGET = SubversionPlugin
PLASTICSCMPLUGIN_TARGET = PlasticSCMPlugin/PlasticSCMPlugin
default: all
all: P4Plugin SvnPlugin PlasticSCMPlugin testserver
@mkdir -p Build/$(PLATFORM)
cp $(PLASTICSCMPLUGIN_TARGET) Build/$(PLATFORM)
testserver: $(TESTSERVER_TARGET)
@mkdir -p Build/$(PLATFORM)
P4Plugin: $(P4PLUGIN_TARGET)
@mkdir -p Build/$(PLATFORM)
cp $(P4PLUGIN_TARGET) Build/$(PLATFORM)
SvnPlugin: $(SVNPLUGIN_TARGET)
@mkdir -p Build/$(PLATFORM)
cp $(SVNPLUGIN_TARGET) Build/$(PLATFORM)
Common: $(COMMON_MODULES)
Common/%.o : Common/%.cpp $(COMMON_INCLS)
$(CXX) $(CXXFLAGS) $(INCLUDE) -c $< -o $@
Test/Source/%.o : Test/Source/%.cpp $(TESTSERVER_INCLS)
$(CXX) $(CXXFLAGS) $(TESTSERVER_INCLUDE) -c $< -o $@
P4Plugin/Source/%.o : P4Plugin/Source/%.cpp $(COMMON_INCLS) $(P4PLUGIN_INCLS)
$(CXX) $(CXXFLAGS) $(P4PLUGIN_INCLUDE) -c $< -o $@
SvnPlugin/Source/%.o : SvnPlugin/Source/%.cpp $(COMMON_INCLS) $(SVNPLUGIN_INCLS)
$(CXX) $(CXXFLAGS) $(SVNPLUGIN_INCLUDE) -c $< -o $@
$(TESTSERVER_TARGET): $(COMMON_MODULES) $(TESTSERVER_MODULES)
$(CXX) -g -arch i386 -o $@ $^
$(P4PLUGIN_TARGET): $(COMMON_MODULES) $(P4PLUGIN_MODULES)
$(CXX) -arch i386 -o $@ -framework Cocoa $^ ./P4Plugin/Source/r12.2/lib/osx32/libssl.a ./P4Plugin/Source/r12.2/lib/osx32/libcrypto.a -L./P4Plugin/Source/r12.2/lib/osx32 $(P4PLUGIN_LINK)
$(SVNPLUGIN_TARGET): $(COMMON_MODULES) $(SVNPLUGIN_MODULES)
$(CXX) -arch i386 -o $@ -framework Cocoa $^ $(SVNPLUGIN_LINK)
clean:
rm -f Build/*.* $(COMMON_MODULES) $(P4PLUGIN_MODULES) $(SVNPLUGIN_MODULES) $(TESTSERVER_MODULES)