74 LIBRARIES= -lc
75 # Building a shared library
76 LINK_SHARED=$(LINK.cc) -G -o $@
77 endif
78
79 # Linux GNU C Compiler
80 ifeq ($(OSNAME), linux)
81 # GNU Compiler options needed to build it
82 COMMON_FLAGS=-fno-strict-aliasing -fPIC -fno-omit-frame-pointer
83 # Options that help find errors
84 COMMON_FLAGS+= -W -Wall -Wno-unused -Wno-parentheses
85 ifeq ($(OPT), true)
86 CXXFLAGS=-O2 $(COMMON_FLAGS)
87 else
88 CXXFLAGS=-g $(COMMON_FLAGS)
89 endif
90 # Object files needed to create library
91 OBJECTS=$(SOURCES:%.cpp=%.o)
92 # Library name and options needed to build it
93 LIBRARY=lib$(LIBNAME).so
94 LDFLAGS=-Wl,-soname=$(LIBRARY) -static-libgcc -mimpure-text
95 # Libraries we are dependent on
96 LIBRARIES=
97 # Building a shared library
98 LINK_SHARED=$(LINK.cc) -shared -o $@
99 endif
100
101 # Windows Microsoft C/C++ Optimizing Compiler Version 12
102 ifeq ($(OSNAME), win32)
103 CC=cl
104 # Compiler options needed to build it
105 COMMON_FLAGS=-Gy -DWIN32
106 # Options that help find errors
107 COMMON_FLAGS+=-W0 -WX
108 ifeq ($(OPT), true)
109 CXXFLAGS= -Ox -Op -Zi $(COMMON_FLAGS)
110 else
111 CXXFLAGS= -Od -Zi $(COMMON_FLAGS)
112 endif
113 # Object files needed to create library
114 OBJECTS=$(SOURCES:%.cpp=%.obj)
|
74 LIBRARIES= -lc
75 # Building a shared library
76 LINK_SHARED=$(LINK.cc) -G -o $@
77 endif
78
79 # Linux GNU C Compiler
80 ifeq ($(OSNAME), linux)
81 # GNU Compiler options needed to build it
82 COMMON_FLAGS=-fno-strict-aliasing -fPIC -fno-omit-frame-pointer
83 # Options that help find errors
84 COMMON_FLAGS+= -W -Wall -Wno-unused -Wno-parentheses
85 ifeq ($(OPT), true)
86 CXXFLAGS=-O2 $(COMMON_FLAGS)
87 else
88 CXXFLAGS=-g $(COMMON_FLAGS)
89 endif
90 # Object files needed to create library
91 OBJECTS=$(SOURCES:%.cpp=%.o)
92 # Library name and options needed to build it
93 LIBRARY=lib$(LIBNAME).so
94 LDFLAGS=-Wl,-soname=$(LIBRARY) -static-libgcc
95 # Libraries we are dependent on
96 LIBRARIES=
97 # Building a shared library
98 LINK_SHARED=$(LINK.cc) -shared -o $@
99 endif
100
101 # Windows Microsoft C/C++ Optimizing Compiler Version 12
102 ifeq ($(OSNAME), win32)
103 CC=cl
104 # Compiler options needed to build it
105 COMMON_FLAGS=-Gy -DWIN32
106 # Options that help find errors
107 COMMON_FLAGS+=-W0 -WX
108 ifeq ($(OPT), true)
109 CXXFLAGS= -Ox -Op -Zi $(COMMON_FLAGS)
110 else
111 CXXFLAGS= -Od -Zi $(COMMON_FLAGS)
112 endif
113 # Object files needed to create library
114 OBJECTS=$(SOURCES:%.cpp=%.obj)
|