-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use common variable for parameters in Makefile
By storing the whole string of parameters into one variable inside the Makefile, maintenance of the Makefile is eased and users can insert arbitrary custom parameters to the compiler.
- Loading branch information
Brian "DragonLord" Wong
authored and
Brian "DragonLord" Wong
committed
Dec 28, 2014
1 parent
85354cb
commit cde7354
Showing
1 changed file
with
15 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,25 @@ | ||
all: int16 int32 int64 short double longdouble | ||
|
||
# Variables | ||
ADVANCE = 1.2589 | ||
NSAMP = 5000 | ||
NTRIAL = 5 | ||
PATIENCE = 10 | ||
RUNTM = 0.5 | ||
STOPRT = 0.15 | ||
STOPTM = 60 | ||
ADVANCE = 1.2589 | ||
NSAMP = 5000 | ||
NTRIAL = 5 | ||
PATIENCE = 10 | ||
RUNTM = 0.5 | ||
STOPRT = 0.15 | ||
STOPTM = 60 | ||
|
||
PARAMETERS = -DADVANCE=$(ADVANCE) -DNSAMP=$(NSAMP) -DNTRIAL=$(NTRIAL) -DPATIENCE=$(PATIENCE) -DRUNTM=$(RUNTM) -DSTOPRT=$(STOPRT) -DSTOPTM=$(STOPTM) | ||
|
||
int16: | ||
gcc -O1 -funroll-loops -march=native -DDSIZE=int16_t -DISIZE=uint64_t -DADVANCE=$(ADVANCE) -DNSAMP=$(NSAMP) -DNTRIAL=$(NTRIAL) -DPATIENCE=$(PATIENCE) -DRUNTM=$(RUNTM) -DSTOPRT=$(STOPRT) -DSTOPTM=$(STOPTM) -o hi64-int16 hi64.c hkernel.c | ||
gcc -O1 -funroll-loops -march=native -DDSIZE=int16_t -DISIZE=uint64_t $(PARAMETERS) -o hi64-int16 hi64.c hkernel.c | ||
int32: | ||
gcc -O1 -funroll-loops -march=native -DDSIZE=int32_t -DISIZE=uint64_t -DADVANCE=$(ADVANCE) -DNSAMP=$(NSAMP) -DNTRIAL=$(NTRIAL) -DPATIENCE=$(PATIENCE) -DRUNTM=$(RUNTM) -DSTOPRT=$(STOPRT) -DSTOPTM=$(STOPTM) -o hi64-int32 hi64.c hkernel.c | ||
gcc -O1 -funroll-loops -march=native -DDSIZE=int32_t -DISIZE=uint64_t $(PARAMETERS) -o hi64-int32 hi64.c hkernel.c | ||
int64: | ||
gcc -O1 -funroll-loops -march=native -DDSIZE=int64_t -DISIZE=uint64_t -DADVANCE=$(ADVANCE) -DNSAMP=$(NSAMP) -DNTRIAL=$(NTRIAL) -DPATIENCE=$(PATIENCE) -DRUNTM=$(RUNTM) -DSTOPRT=$(STOPRT) -DSTOPTM=$(STOPTM) -o hi64-int64 hi64.c hkernel.c | ||
gcc -O1 -funroll-loops -march=native -DDSIZE=int64_t -DISIZE=uint64_t $(PARAMETERS) -o hi64-int64 hi64.c hkernel.c | ||
short: | ||
gcc -O1 -funroll-loops -march=native -DDSIZE=short -DISIZE=uint64_t -DADVANCE=$(ADVANCE) -DNSAMP=$(NSAMP) -DNTRIAL=$(NTRIAL) -DPATIENCE=$(PATIENCE) -DRUNTM=$(RUNTM) -DSTOPRT=$(STOPRT) -DSTOPTM=$(STOPTM) -o hi64-short hi64.c hkernel.c | ||
gcc -O1 -funroll-loops -march=native -DDSIZE=short -DISIZE=uint64_t $(PARAMETERS) -o hi64-short hi64.c hkernel.c | ||
double: | ||
gcc -O1 -funroll-loops -march=native -DDSIZE=double -DISIZE=uint64_t -DADVANCE=$(ADVANCE) -DNSAMP=$(NSAMP) -DNTRIAL=$(NTRIAL) -DPATIENCE=$(PATIENCE) -DRUNTM=$(RUNTM) -DSTOPRT=$(STOPRT) -DSTOPTM=$(STOPTM) -o hi64-double hi64.c hkernel.c | ||
gcc -O1 -funroll-loops -march=native -DDSIZE=double -DISIZE=uint64_t $(PARAMETERS) -o hi64-double hi64.c hkernel.c | ||
longdouble: | ||
gcc -O1 -funroll-loops -march=native -DDSIZE="long double" -DISIZE=uint64_t -DADVANCE=$(ADVANCE) -DNSAMP=$(NSAMP) -DNTRIAL=$(NTRIAL) -DPATIENCE=$(PATIENCE) -DRUNTM=$(RUNTM) -DSTOPRT=$(STOPRT) -DSTOPTM=$(STOPTM) -o hi64-longdouble hi64.c hkernel.c | ||
gcc -O1 -funroll-loops -march=native -DDSIZE="long double" -DISIZE=uint64_t $(PARAMETERS) -o hi64-longdouble hi64.c hkernel.c |