File: pass-buildflags.patch

package info (click to toggle)
c2x 2.42.a%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,368 kB
  • sloc: ansic: 29,412; makefile: 61; sh: 1
file content (28 lines) | stat: -rw-r--r-- 782 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Description: Pass the default build flags.
Author: Andrius Merkys <merkys@debian.org>
Bug-Debian: https://bugs.debian.org/1119367
--- a/Makefile
+++ b/Makefile
@@ -25,10 +25,10 @@
 # For SPGLIB (1.8.3 or greater)
 
 DEFS=-DSPGLIB
-CPPFLAGS=-I.
+CPPFLAGS+=-I.
 # Add "-fopenmp" to next line if the linker complains about various
 # missing threads
-LDFLAGS=-L.
+LDFLAGS?=-L.
 LIBS=-lsymspg
 
 # To compile without SPGLIB, set all of the above to be empty
@@ -40,7 +40,8 @@
 
 # Linux or MacOS / x86_64 / gcc
 # For better optimisation on x86_64, add -mavx2 assuming modern hardware
-CFLAGS=-Wall -Wno-unused-result -O2 -g $(DEFS)
+CFLAGS?=-Wall -Wno-unused-result -O2 -g
+CFLAGS+=$(DEFS)
 
 # Linux / IA32 / gcc
 #CFLAGS=-Wall -Wno-unused-result -O -D_FILE_OFFSET_BITS=64 $(DEFS) -g