Skip to content

Commit

Permalink
Merge pull request #53 from madebr/makefile_AR_CC_variables
Browse files Browse the repository at this point in the history
Use $(CC) and $(AR) in Makefile
  • Loading branch information
mborgerding authored Nov 6, 2020
2 parents 15debe8 + fcf9fa9 commit cc862cb
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ KFVER=131
DATATYPE ?= float

PREFIX ?= /usr/local
INCDIR ?= $(PREFIX)/include
LIBDIR ?= $(PREFIX)/lib

INSTALL ?= install
Expand All @@ -16,11 +17,12 @@ else
endif

all:
gcc -Wall -fPIC -c *.c -Dkiss_fft_scalar=$(DATATYPE) -o kiss_fft.o
ar crus libkissfft.a kiss_fft.o
gcc -shared $(SHARED_FLAGS) -o $(SHARED_NAME) kiss_fft.o
$(CC) -Wall -fPIC -c *.c -Dkiss_fft_scalar=$(DATATYPE) -o kiss_fft.o
$(AR) crus libkissfft.a kiss_fft.o
$(CC) -shared $(SHARED_FLAGS) -o $(SHARED_NAME) kiss_fft.o

install: all
$(INSTALL) -Dt $(INCDIR) -m 644 kiss_fft.h
$(INSTALL) -Dt $(LIBDIR) $(SHARED_NAME)

doc:
Expand Down Expand Up @@ -53,6 +55,6 @@ asm: kiss_fft.s

kiss_fft.s: kiss_fft.c kiss_fft.h _kiss_fft_guts.h
[ -e kiss_fft.s ] && mv kiss_fft.s kiss_fft.s~ || true
gcc -S kiss_fft.c -O3 -mtune=native -ffast-math -fomit-frame-pointer -unroll-loops -dA -fverbose-asm
gcc -o kiss_fft_short.s -S kiss_fft.c -O3 -mtune=native -ffast-math -fomit-frame-pointer -dA -fverbose-asm -DFIXED_POINT
$(CC) -S kiss_fft.c -O3 -mtune=native -ffast-math -fomit-frame-pointer -unroll-loops -dA -fverbose-asm
$(CC) -o kiss_fft_short.s -S kiss_fft.c -O3 -mtune=native -ffast-math -fomit-frame-pointer -dA -fverbose-asm -DFIXED_POINT
[ -e kiss_fft.s~ ] && diff kiss_fft.s~ kiss_fft.s || true

0 comments on commit cc862cb

Please sign in to comment.