Minor changes in makefile(s)
netzel

netzel commited on 2024-05-16 14:28:26
Showing 2 changed files, with 12 additions and 11 deletions.

... ...
@@ -3,7 +3,8 @@ PROG = plforestfragment
3 3
 
4 4
 CC = gcc
5 5
 
6
-CFLAGS=-Wall -fopenmp -O3 -msse2 -mfpmath=sse -Wl,-rpath,'$$ORIGIN/' -I/usr/include/gdal -lgomp -lgdal -lezgdal -largtable3 -lm
6
+CFLAGS=-Wall -fopenmp -O3 -msse2 -mfpmath=sse -Wl,-rpath,'$$ORIGIN/' -I/usr/include/gdal
7
+LIBFLAGS = -lgomp -lgdal -lezgdal -largtable3 -lm
7 8
 
8 9
 COMMON_C = $(shell ls *.c)
9 10
 COMMON_C_O = $(COMMON_C:%.c=%.o)
... ...
@@ -15,11 +16,11 @@ endif
15 16
 
16 17
 default: $(PROG)
17 18
 
18
-$(PROG): $(COMMON_C_O) $(HEADERS)
19
-	$(CC) $(CFLAGS) -o $(PROG) $(COMMON_O) $(COMMON_C_O)
19
+$(PROG): $(COMMON_C_O)
20
+	$(CC) $(CFLAGS) -o $(PROG) $(COMMON_O) $(COMMON_C_O) $(LIBFLAGS)
20 21
 
21
-$(COMMON_C_O): $(COMMON_C) $(HEADERS_C)
22
-	$(CC) $(CFLAGS) -c  $(COMMON_C)
22
+$(COMMON_C_O): $(COMMON_C)
23
+	$(CC) $(CFLAGS) -c  $(COMMON_C) $(LIBFLAGS)
23 24
 
24 25
 install: 
25 26
 	cp -f $(PROG) $(PREFIX)/bin
... ...
@@ -2,19 +2,19 @@ PROG = plforestfragment.exe
2 2
 
3 3
 CC = x86_64-w64-mingw32-gcc 
4 4
 
5
-CFLAGS= -I../../Win64_cross/gdal/include -I../../Win64_cross/ezgdal -I../../Win64_cross/argtable3 -L../../Win64_cross/argtable3 -L../../Win64_cross/gdal/bin -L../../Win64_cross/ezgdal -Wall -fopenmp -O3 -msse2 -mfpmath=sse -lgomp -lgdal -llibezgdal -llibargtable3 -lm
5
+CFLAGS= -I../../Win64_cross/gdal/include -I../../Win64_cross/ezgdal -I../../Win64_cross/argtable3 -L../../Win64_cross/argtable3 -L../../Win64_cross/gdal/bin -L../../Win64_cross/ezgdal -Wall -fopenmp -O3 -msse2 -mfpmath=sse
6
+LIBFLAGS = -lgomp -lgdal -llibezgdal -llibargtable3 -lm
6 7
 
7 8
 COMMON_C = $(shell ls *.c)
8 9
 COMMON_C_O = $(COMMON_C:%.c=%.o)
9
-HEADERS = $(shell ls *.h)
10 10
 
11 11
 default: $(PROG)
12 12
 
13
-$(PROG): $(COMMON_C_O) $(HEADERS)
14
-	$(CC) $(CFLAGS) -o $(PROG) $(COMMON_C_O)
13
+$(PROG): $(COMMON_C_O)
14
+	$(CC) $(CFLAGS) -o $(PROG) $(COMMON_C_O) $(LIBFLAGS)
15 15
 
16
-$(COMMON_C_O): $(COMMON_C) $(HEADERS)
17
-	$(CC) $(CFLAGS) -c  $(COMMON_C)
16
+$(COMMON_C_O): $(COMMON_C)
17
+	$(CC) $(CFLAGS) -c  $(COMMON_C) $(LIBFLAGS)
18 18
 
19 19
 clean:
20 20
 	rm -f *.o $(PROG)
21 21