-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Cheng Cao <bobcaocheng@163.com>
- Loading branch information
Cheng Cao
committed
Dec 6, 2016
1 parent
e13b948
commit c6f1ff8
Showing
4 changed files
with
63 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Mac does not support that make.rb, in a strange way.. | ||
|
||
CXX = gcc | ||
CCLD = gcc | ||
|
||
OBJ = libVMDE.so | ||
Src = $(shell find . -name "*.cpp") | ||
Objects = $(patsubst %.cpp, %.o, $(Src)) | ||
|
||
LIBS = $(shell pkg-config --libs glfw3 gl glm glew portaudio-2.0 ogg vorbisfile) -lstdc++ /usr/lib/libSOIL.so | ||
LDFLAGS = -shared -O4 | ||
CXXFLAGS = -I../lib/SOIL/include -I../ \ | ||
$(shell pkg-config --cflags gl glfw3 glm glew portaudio-2.0 vorbisfile) \ | ||
-std=c++14 -Wall -Wextra -O3 -c -fPIC \ | ||
-Ofast -msse4.1 -mtune=core2 | ||
|
||
all: $(OBJ) | ||
|
||
.cpp.o: .cpp | ||
@echo 编译C++文件$^…… | ||
$(CXX) $(CXXFLAGS) $^ -o $@ | ||
|
||
$(OBJ): $(Objects) | ||
@echo 链接最终二进制 | ||
$(CCLD) $(LIBS) $(LDFLAGS) $^ -o $(OBJ) | ||
|
||
clean: | ||
rm -rf $(OBJ) $(Objects) | ||
|
||
.PHONY: all clean |
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# make.rb is not working on Mac | ||
|
||
CXX = clang++ | ||
CCLD = clang | ||
|
||
OBJ = VMGS | ||
Src = $(shell find . -name "*.cpp") | ||
Objects = $(patsubst %.cpp, %.o, $(Src)) | ||
|
||
LIBS = $(shell pkg-config --libs --static glfw3 glm gl glew portaudio-2.0 vorbisfile) -lstdc++ | ||
LDFLAGS = -O4 -fPIC ../VMDE/libVMDE.so | ||
CXXFLAGS = -I../lib/SOIL/include -I../VMDE \ | ||
$(shell pkg-config --cflags glfw3 glm glew gl portaudio-2.0 vorbisfile) \ | ||
-I../ -std=c++14 -Wall -Wextra -O3 -c \ | ||
-Ofast -msse4.1 -mtune=core2 | ||
|
||
all: $(OBJ) | ||
run: all | ||
@echo 运行 | ||
./$(OBJ) | ||
|
||
.cpp.o: .cpp | ||
@echo 编译C++文件$^…… | ||
$(CXX) $(CXXFLAGS) $^ -o $@ | ||
|
||
VMGS: $(Objects) | ||
@echo 链接最终二进制 | ||
$(CCLD) $(LIBS) $(LDFLAGS) $^ -o VMGS | ||
|
||
clean: | ||
rm -rf $(OBJ) $(Objects)mcpu | ||
|
||
.PHONY: all run clean |
File renamed without changes.