Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit f386a31

Browse files
committedApr 8, 2014
make openmp flags universal for gcc, icc, and clang
clang: http://clang-omp.github.io/
1 parent c2e5959 commit f386a31

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed
 

‎Makefile

+1-6
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,7 @@ lib/libimagequant.a::
7979
$(MAKE) -C lib static
8080

8181
openmp::
82-
ifeq ($(CC), icc)
83-
$(MAKE) CFLAGSADD="$(CFLAGSADD) -openmp" OPENMPFLAGS=-openmp -j8 $(MKFLAGS)
84-
else
85-
$(MAKE) CFLAGSADD="$(CFLAGSADD) -fopenmp" OPENMPFLAGS="-Bstatic -lgomp" -j8 $(MKFLAGS)
86-
endif
87-
82+
$(MAKE) CFLAGSADD="$(CFLAGSADD) -fopenmp" OPENMPFLAGS="-Bstatic -fopenmp" -j8 $(MKFLAGS)
8883

8984
$(BIN): $(OBJS) lib/libimagequant.a
9085
$(CC) $(OBJS) $(LDFLAGS) $(OPENMPFLAGS) $(FRAMEWORKS) -o $@

‎lib/Makefile

+1-5
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,7 @@ dll:
4141
$(MAKE) CFLAGSADD="-DLIQ_EXPORT='__declspec(dllexport)'" $(DLL)
4242

4343
openmp::
44-
ifeq ($(CC), icc)
45-
$(MAKE) CFLAGSADD=-openmp OPENMPFLAGS=-openmp -j8
46-
else
47-
$(MAKE) CFLAGSADD=-fopenmp OPENMPFLAGS="-Bstatic -lgomp" -j8
48-
endif
44+
$(MAKE) CFLAGSADD=-fopenmp OPENMPFLAGS="-Bstatic -fopenmp" -j8
4945

5046
$(DLL) $(DLLIMP): $(OBJS)
5147
$(CC) -fPIC -shared -o $(DLL) $(OBJS) $(LDFLAGS) -Wl,--out-implib,$(DLLIMP),--output-def,$(DLLDEF)

0 commit comments

Comments
 (0)
Please sign in to comment.