-
-
Notifications
You must be signed in to change notification settings - Fork 76
/
Makefile-commands
91 lines (73 loc) · 2.11 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
########## fre:ac commands makefile ##########
include $(dir $(firstword $(MAKEFILE_LIST)))/$(FREAC_PATH)/Makefile-options
CCOPTS = -fvisibility=hidden -DBOCA_COMPONENT_BUILD $(DEFINE)
LDOPTS = $(LIBS)
ifneq ("$(CDK_INSTALL_PATH)","")
CCOPTS += -I"$(CDK_INSTALL_PATH)"/include
LDOPTS += -L"$(CDK_INSTALL_PATH)"/$(LIBDIR)
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_OSX),True)
ifeq ($(BUILD_NETBSD),True)
CCOPTS += -I/usr/pkg/include
else
CCOPTS += -I/usr/local/include
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
ifneq ($(BUILD_LINUX),True)
ifneq ($(BUILD_SOLARIS),True)
LDOPTS += -L/usr/local/lib
endif
endif
endif
endif
all: allcmds $(FREAC_PATH)/$(BINDIR)/boca/freac_$(TYPE)_$(TARGET).$(VERSION)$(SHARED)
allcmds:
+ $(ALLCMD1)
+ $(ALLCMD2)
$(FREAC_PATH)/$(BINDIR)/boca/freac_$(TYPE)_$(TARGET).$(VERSION)$(SHARED) : $(OBJECTS)
mkdir -p $(FREAC_PATH)/$(BINDIR)/boca
ifneq ($(BUILD_OSX),True)
$(LD) --shared -o $@ $(OBJECTS) $(LDOPTS) $(LDFLAGS)
else
$(LD) -dynamiclib -o $@ $(OBJECTS) $(LDOPTS) $(LDFLAGS)
endif
clean:
rm -f $(FREAC_PATH)/$(BINDIR)/boca/freac_$(TYPE)_$(TARGET).$(VERSION)$(SHARED) $(OBJECTS)
$(CLEANCMD1)
$(CLEANCMD2)
install: all
ifneq ($(BUILD_WIN32),True)
$(INSTALL) -d "$(DESTDIR)"$(libdir)/freac
$(INSTALL_DATA) $(FREAC_PATH)/$(BINDIR)/boca/freac_$(TYPE)_$(TARGET).$(VERSION)$(SHARED) "$(DESTDIR)"$(libdir)/freac
endif
$(INSTCMD1)
$(INSTCMD2)
uninstall:
ifneq ($(BUILD_WIN32),True)
rm -f "$(DESTDIR)"$(libdir)/freac/freac_$(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 $@