mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-13 07:47:39 +02:00
Sync Adam's changes for Mac
This commit is contained in:
parent
a09bceb19f
commit
16bd644abb
2 changed files with 21 additions and 5 deletions
|
@ -10,7 +10,7 @@ CYC_PROFILING ?=
|
||||||
CYC_GCC_OPT_FLAGS ?= -O2
|
CYC_GCC_OPT_FLAGS ?= -O2
|
||||||
#CYC_GCC_OPT_FLAGS ?= -g
|
#CYC_GCC_OPT_FLAGS ?= -g
|
||||||
|
|
||||||
OS ?= $(shell uname)
|
OS = $(shell uname)
|
||||||
CC ?= cc
|
CC ?= cc
|
||||||
|
|
||||||
LIBS = -pthread -lcyclone -lck -lm -ltommath
|
LIBS = -pthread -lcyclone -lck -lm -ltommath
|
||||||
|
@ -21,19 +21,29 @@ endif
|
||||||
|
|
||||||
# Compiler options
|
# Compiler options
|
||||||
CFLAGS ?= $(CYC_PROFILING) $(CYC_GCC_OPT_FLAGS) -fPIC -Wall -Iinclude
|
CFLAGS ?= $(CYC_PROFILING) $(CYC_GCC_OPT_FLAGS) -fPIC -Wall -Iinclude
|
||||||
COMP_CFLAGS ?= $(CYC_PROFILING) $(CYC_GCC_OPT_FLAGS) -fPIC -Wall -I$(PREFIX)/include -L$(PREFIX)/lib
|
BASE_CFLAGS ?= $(CYC_PROFILING) $(CYC_GCC_OPT_FLAGS) -fPIC -Wall -I$(PREFIX)/include
|
||||||
|
ifeq ($(OS),Darwin)
|
||||||
|
COMP_CFLAGS ?= $(BASE_CFLAGS)
|
||||||
|
else
|
||||||
|
COMP_CFLAGS ?= $(BASE_CFLAGS) -L$(PREFIX)/lib
|
||||||
|
endif
|
||||||
|
|
||||||
# Use these lines instead for debugging or profiling
|
# Use these lines instead for debugging or profiling
|
||||||
#CFLAGS = -g -Wall
|
#CFLAGS = -g -Wall
|
||||||
#CFLAGS = -g -pg -Wall
|
#CFLAGS = -g -pg -Wall
|
||||||
|
|
||||||
# Linker options
|
# Linker options
|
||||||
LDFLAGS ?= -L. $(CYC_PROFILING)
|
LDFLAGS ?= -L. $(CYC_PROFILING)
|
||||||
|
LIBRARY_OUTPUT_FILE = libcyclone.a
|
||||||
ifeq ($(OS),Darwin)
|
ifeq ($(OS),Darwin)
|
||||||
LDFLAGS += -Wl,-export_dynamic -Wl,-undefined -Wl,dynamic_lookup
|
LDFLAGS += -Wl,-undefined -Wl,dynamic_lookup
|
||||||
COMP_CFLAGS += -Wl,-export_dynamic
|
CREATE_LIBRARY_COMMAND = $(LIBTOOL)
|
||||||
|
CREATE_LIBRARY_FLAGS = -static -o
|
||||||
else
|
else
|
||||||
LDFLAGS += -Wl,--export-dynamic
|
LDFLAGS += -Wl,--export-dynamic
|
||||||
COMP_CFLAGS += -Wl,--export-dynamic
|
COMP_CFLAGS += -Wl,--export-dynamic
|
||||||
|
CREATE_LIBRARY_COMMAND = $(AR)
|
||||||
|
CREATE_LIBRARY_FLAGS = rcs
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# /usr/local is not in the search path by default on FreeBSD, so if libtommath and/or
|
# /usr/local is not in the search path by default on FreeBSD, so if libtommath and/or
|
||||||
|
@ -44,6 +54,7 @@ LDFLAGS += -L/usr/local/lib
|
||||||
CFLAGS += -I/usr/local/include
|
CFLAGS += -I/usr/local/include
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
# Commands "baked into" cyclone for invoking the C compiler
|
# Commands "baked into" cyclone for invoking the C compiler
|
||||||
CC_PROG ?= "$(CC) ~src-file~ $(COMP_CFLAGS) -c -o ~exec-file~.o"
|
CC_PROG ?= "$(CC) ~src-file~ $(COMP_CFLAGS) -c -o ~exec-file~.o"
|
||||||
CC_EXEC ?= "$(CC) ~exec-file~.o ~obj-files~ $(LIBS) $(COMP_CFLAGS) -o ~exec-file~"
|
CC_EXEC ?= "$(CC) ~exec-file~.o ~obj-files~ $(LIBS) $(COMP_CFLAGS) -o ~exec-file~"
|
||||||
|
@ -51,6 +62,7 @@ CC_LIB ?= "$(CC) ~src-file~ $(COMP_CFLAGS) -c -o ~exec-file~.o"
|
||||||
CC_SO ?= "$(CC) -shared $(LDFLAGS) -o ~exec-file~.so ~exec-file~.o"
|
CC_SO ?= "$(CC) -shared $(LDFLAGS) -o ~exec-file~.so ~exec-file~.o"
|
||||||
|
|
||||||
AR ?= ar
|
AR ?= ar
|
||||||
|
LIBTOOL ?= libtool
|
||||||
#CD ?= cd
|
#CD ?= cd
|
||||||
RM ?= rm -f
|
RM ?= rm -f
|
||||||
#LS ?= ls
|
#LS ?= ls
|
||||||
|
|
|
@ -13,6 +13,10 @@ ifneq ($(OS),FreeBSD)
|
||||||
LIBS += -ldl
|
LIBS += -ldl
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
LIBRARY_OUTPUT_FILE = libcyclone.a
|
||||||
|
CREATE_LIBRARY_COMMAND = $(AR)
|
||||||
|
CREATE_LIBRARY_FLAGS = rcs
|
||||||
|
|
||||||
# Compiler options
|
# Compiler options
|
||||||
CFLAGS ?= -O2 -fPIC -Wall -march=armv6k -Iinclude
|
CFLAGS ?= -O2 -fPIC -Wall -march=armv6k -Iinclude
|
||||||
COMP_CFLAGS ?= -O2 -fPIC -Wall -march=armv6k -I$(PREFIX)/include -L$(PREFIX)/lib
|
COMP_CFLAGS ?= -O2 -fPIC -Wall -march=armv6k -I$(PREFIX)/include -L$(PREFIX)/lib
|
||||||
|
|
Loading…
Add table
Reference in a new issue