File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# -*- mode: makefile-gmake -*-
22
3- OS = $(shell uname)
4- ARCH = $(shell uname -m)
3+ OS := $(shell uname)
54
65FC = gfortran
76FFLAGS += -O3
87
98USEGCC = 1
109USECLANG = 0
1110
12- CFLAGS_add += -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
1311
1412ifeq ($(USECLANG),1 )
1513USEGCC = 0
@@ -23,6 +21,10 @@ CFLAGS_add += -fno-gnu89-inline
2321endif
2422AR = ar
2523
24+ ARCH := $(shell $(CC) -dumpmachine | sed " s/\( [^-]*\) .*$$/\1 /" )
25+
26+ CFLAGS_add += -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
27+
2628default: all
2729
2830%.c.o: %.c
@@ -39,15 +41,15 @@ clean:
3941
4042# OS-specific stuff
4143ifeq ($(ARCH),i386)
42- override ARCH = i387
44+ override ARCH : = i387
4345endif
4446
4547ifeq ($(ARCH),x86_64)
46- override ARCH = amd64
48+ override ARCH : = amd64
4749endif
4850
4951ifeq ($(ARCH),i686)
50- override ARCH = i387
52+ override ARCH : = i387
5153endif
5254
5355ifneq (,$(findstring MINGW,$(OS)))
You can’t perform that action at this time.
0 commit comments