Last active
February 27, 2019 16:04
-
-
Save candh/ad3fd2126e6c1b1d4f4c92beb43c04cb to your computer and use it in GitHub Desktop.
makefile for OpenGL projects in C for both Mac and Linux (Works with gcc versions >= 5.5 on linux. Tested on Ubuntu)
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
# candh | |
# set compiler | |
CC = gcc | |
MACFLAGS = -framework OpenGL -framework GLUT | |
LINFLAGS = -lGL -lGLU -lglut | |
TARGET = main | |
mac: | |
$(CC) $(MACFLAGS) -o $(TARGET) $(TARGET).c | |
linux: | |
$(CC) $(LINFLAGS) -o $(TARGET) $(TARGET).c | |
run: | |
./$(TARGET) | |
clean: | |
$(RM) $(TARGET) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment