Created
September 20, 2016 15:01
-
-
Save xerpi/af9512f6e915fc74d9bb4a1b67cd2bce to your computer and use it in GitHub Desktop.
VJ Makefile
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
TARGET = $(notdir $(CURDIR)) | |
CC = gcc | |
CXX = g++ | |
CFLAGS = -g -O2 -I/usr/include/SOIL | |
CXXFLAGS = $(CFLAGS) | |
LIBS = -lSOIL -lglut -lGLEW -lGL -lm | |
CFILES = $(wildcard *.c) | |
CPPFILES = $(wildcard *.cpp) | |
OBJS = $(CPPFILES:.cpp=.o) $(CFILES:.c=.o) | |
$(TARGET): $(OBJS) | |
$(CXX) -o $@ $^ $(CFLAGS) $(LIBS) | |
%.o: %.c | |
$(CC) -c -o $@ $< $(CFLAGS) | |
%.o: %.cpp | |
$(CXX) -c -o $@ $< $(CXXFLAGS) | |
.PHONY: clean | |
clean: | |
rm -f $(TARGET) $(OBJS) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment