This repository has been archived by the owner on Dec 11, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Makefile-commands
94 lines (76 loc) · 2.17 KB
/
Makefile-commands
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
########## BoCA commands makefile ##########
include $(dir $(firstword $(MAKEFILE_LIST)))/$(BOCA_PATH)/Makefile-options
CCOPTS = -fvisibility=hidden -DBOCA_COMPONENT_BUILD $(DEFINE) -I$(CDK_INSTALL_PATH)/include
LDOPTS = -L$(CDK_INSTALL_PATH)/$(LIBDIR) $(LIBS)
ifeq (,$(findstring -lstdc++,$(LIBS)))
LDOPTS += -lstdc++
endif
ifeq ($(BUILD_WIN32),True)
LDOPTS += -lsmooth -lboca -Wl,--dynamicbase,--nxcompat,--enable-auto-import
else
CCOPTS += -fPIC
ifneq ($(BUILD_SOLARIS),True)
ifneq ($(BUILD_HAIKU),True)
CCOPTS += -pthread
ifneq ($(BUILD_LINUX),True)
ifneq ($(BUILD_OSX),True)
ifeq ($(BUILD_NETBSD),True)
CCOPTS += -I/usr/pkg/include
else
CCOPTS += -I/usr/local/include
endif
endif
endif
endif
endif
LDOPTS += -L$(prefix)/lib -lsmooth-$(SMOOTHVER) -lboca-$(VERSION)
ifeq ($(BUILD_OSX),True)
LDOPTS += -Wl,-headerpad,80
else ifeq ($(BUILD_NETBSD),True)
LDOPTS += -Wl,-rpath,/usr/pkg/lib -L/usr/pkg/lib
else ifeq ($(BUILD_HAIKU),True)
LDOPTS += -L/boot/common/lib
else
ifneq ($(BUILD_LINUX),True)
ifneq ($(BUILD_SOLARIS),True)
LDOPTS += -L/usr/local/lib
endif
endif
endif
endif
all: allcmds $(BOCA_PATH)/$(BINDIR)/boca_$(TYPE)_$(TARGET).$(VERSION)$(SHARED)
allcmds:
+ $(ALLCMD1)
+ $(ALLCMD2)
$(BOCA_PATH)/$(BINDIR)/boca_$(TYPE)_$(TARGET).$(VERSION)$(SHARED) : $(OBJECTS)
mkdir -p $(BOCA_PATH)/$(BINDIR)
ifneq ($(BUILD_OSX),True)
$(LD) --shared -o $@ $(OBJECTS) $(LDOPTS) $(LDFLAGS)
else
$(LD) -dynamiclib -o $@ $(OBJECTS) $(LDOPTS) $(LDFLAGS)
endif
clean:
rm -f $(BOCA_PATH)/$(BINDIR)/boca_$(TYPE)_$(TARGET).$(VERSION)$(SHARED) $(OBJECTS)
$(CLEANCMD1)
$(CLEANCMD2)
install: all
ifneq ($(BUILD_WIN32),True)
$(INSTALL) -d $(DESTDIR)$(libdir)/boca
$(INSTALL_DATA) $(BOCA_PATH)/$(BINDIR)/boca_$(TYPE)_$(TARGET).$(VERSION)$(SHARED) $(DESTDIR)$(libdir)/boca
endif
$(INSTCMD1)
$(INSTCMD2)
uninstall:
ifneq ($(BUILD_WIN32),True)
rm -f $(DESTDIR)$(libdir)/boca/boca_$(TYPE)_$(TARGET).$(VERSION)$(SHARED)
endif
$(UINSTCMD1)
$(UINSTCMD2)
.c.o:
$(CC) $(CCOPTS) $(CFLAGS) -c $< -o $@
.cpp.o:
$(CXX) $(CCOPTS) $(CXXFLAGS) -c $< -o $@
.m.o:
$(OBJC) $(CCOPTS) $(OBJCFLAGS) -c $< -o $@
.mm.o:
$(OBJCXX) $(CCOPTS) $(OBJCXXFLAGS) -c $< -o $@