mirror of
https://git.planet-casio.com/Lephenixnoir/OpenLibm.git
synced 2024-12-29 13:03:42 +01:00
Ability to use clang.
This commit is contained in:
parent
62c895488f
commit
56811b0809
2 changed files with 17 additions and 2 deletions
16
Make.inc
16
Make.inc
|
@ -1,7 +1,19 @@
|
||||||
CC=gcc
|
|
||||||
OS = $(shell uname)
|
OS = $(shell uname)
|
||||||
ARCH = $(shell uname -m)
|
ARCH = $(shell uname -m)
|
||||||
CFLAGS= -std=c99 -Wall -O2 -I$(OPENLIBM_HOME) -I$(OPENLIBM_HOME)/include -I$(OPENLIBM_HOME)/ld80 -I$(OPENLIBM_HOME)/$(ARCH) -I$(OPENLIBM_HOME)/src -DASSEMBLER -D__BSD_VISIBLE -Wno-implicit-function-declaration
|
|
||||||
|
USEGCC = 1
|
||||||
|
USECLANG = 0
|
||||||
|
|
||||||
|
ifeq ($(USECLANG),1)
|
||||||
|
USEGCC = 0
|
||||||
|
CC = clang
|
||||||
|
CFLAGS= -std=c99 -Wall -O4 -I$(OPENLIBM_HOME) -I$(OPENLIBM_HOME)/include -I$(OPENLIBM_HOME)/ld80 -I$(OPENLIBM_HOME)/$(ARCH) -I$(OPENLIBM_HOME)/src -DASSEMBLER -D__BSD_VISIBLE -Wno-implicit-function-declaration
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(USEGCC),1)
|
||||||
|
CC = gcc
|
||||||
|
CFLAGS= -std=c99 -Wall -O3 -I$(OPENLIBM_HOME) -I$(OPENLIBM_HOME)/include -I$(OPENLIBM_HOME)/ld80 -I$(OPENLIBM_HOME)/$(ARCH) -I$(OPENLIBM_HOME)/src -DASSEMBLER -D__BSD_VISIBLE -Wno-implicit-function-declaration
|
||||||
|
endif
|
||||||
|
|
||||||
default: all
|
default: all
|
||||||
|
|
||||||
|
|
3
Makefile
3
Makefile
|
@ -19,7 +19,9 @@ DUPLICATE_SRCS = $(addsuffix .c,$(DUPLICATE_NAMES))
|
||||||
|
|
||||||
OBJS = $(patsubst %.S,%.S.o,\
|
OBJS = $(patsubst %.S,%.S.o,\
|
||||||
$(patsubst %.c,%.c.o,$(filter-out $(addprefix src/,$(DUPLICATE_SRCS)),$(SRCS))))
|
$(patsubst %.c,%.c.o,$(filter-out $(addprefix src/,$(DUPLICATE_SRCS)),$(SRCS))))
|
||||||
|
|
||||||
all: libopenlibm.a libopenlibm.$(SHLIB_EXT)
|
all: libopenlibm.a libopenlibm.$(SHLIB_EXT)
|
||||||
|
$(MAKE) -C test
|
||||||
libopenlibm.a: $(OBJS)
|
libopenlibm.a: $(OBJS)
|
||||||
$(QUIET_LINK)ar -rcs libopenlibm.a $(OBJS)
|
$(QUIET_LINK)ar -rcs libopenlibm.a $(OBJS)
|
||||||
libopenlibm.$(SHLIB_EXT): $(OBJS)
|
libopenlibm.$(SHLIB_EXT): $(OBJS)
|
||||||
|
@ -27,3 +29,4 @@ libopenlibm.$(SHLIB_EXT): $(OBJS)
|
||||||
|
|
||||||
cleanall:
|
cleanall:
|
||||||
rm -f $(OBJS) *.a *.$(SHLIB_EXT)
|
rm -f $(OBJS) *.a *.$(SHLIB_EXT)
|
||||||
|
$(MAKE) -C test clean
|
||||||
|
|
Loading…
Reference in a new issue