OpenLibm/Make.inc

55 lines
1 KiB
PHP
Raw Normal View History

2011-12-31 14:56:51 +01:00
CC=gcc
CFLAGS= -Wall -O2 -I. -I.. -I../include -I../ld128 -I../src -DASSEMBLER -D__BSD_VISIBLE -Wno-implicit-function-declaration
2011-12-31 08:18:43 +01:00
2011-12-31 14:56:51 +01:00
default: all
%.c.o: %.c
$(CC) $(CFLAGS) -c $< -o $@
2011-12-31 08:18:43 +01:00
%.S.o: %.S
$(CC) $(filter -f% -m% -B% -I% -D%,$(CFLAGS)) -c $< -o $@
2011-12-31 08:18:43 +01:00
clean:
2012-05-25 05:38:33 +02:00
rm -f *.o *.c.o *.S.o *~
2011-12-31 08:18:43 +01:00
# OS-specific stuff
OS = $(shell uname)
ARCH = $(shell uname -m)
2011-12-31 08:18:43 +01:00
ifeq ($(OS), MINGW32_NT-6.1)
OS=WINNT
endif
2011-12-31 08:18:43 +01:00
ifeq ($(OS), Linux)
SHLIB_EXT = so
CFLAGS+=-std=gnu99 -fPIC
endif
ifeq ($(OS), FreeBSD)
SHLIB_EXT = so
CFLAGS+=-std=gnu99 -fPIC
2011-12-31 08:18:43 +01:00
endif
ifeq ($(OS), Darwin)
SHLIB_EXT = dylib
CFLAGS+=-std=gnu99 -fPIC
endif
ifeq ($(OS), WINNT)
SHLIB_EXT = dll
2011-12-31 08:18:43 +01:00
endif
# Colors for make
CCCOLOR="\033[34m"
LINKCOLOR="\033[34;1m"
SRCCOLOR="\033[33m"
BINCOLOR="\033[37;1m"
MAKECOLOR="\033[32;1m"
ENDCOLOR="\033[0m"
QUIET_CC = @printf ' %b %b\n' $(CCCOLOR)CC$(ENDCOLOR) $(SRCCOLOR)$@$(ENDCOLOR);
QUIET_ASM = @printf ' %b %b\n' $(CCCOLOR)ASM$(ENDCOLOR) $(SRCCOLOR)$@$(ENDCOLOR);
2011-12-31 08:18:43 +01:00
QUIET_LINK = @printf ' %b %b\n' $(LINKCOLOR)LINK$(ENDCOLOR) $(BINCOLOR)$@$(ENDCOLOR);