12345678910111213141516171819202122232425262728293031 |
- CC=gcc
- CPP=g++
- CFLAGS=-Wall -Wno-misleading-indentation -Werror -g
- CPPFLAGS=-Wall -Wno-misleading-indentation -Werror --std=c++1z -g
- LDFLAGS=
- INCLUDES=
- LIBRARIES=-lX11 -lGL -lpthread -lpng
- SOURCES=$(wildcard src/*.c)
- SOURCES_CPP=$(wildcard src/*.cpp)
- OBJECTS=$(SOURCES:.c=.o) $(SOURCES_CPP:.cpp=.o)
- EXECUTABLE=awoorwa
-
- all: $(SOURCES) $(SOURCES_CPP) $(EXECUTABLE)
-
- clean:
- rm -rf $(OBJECTS) $(EXECUTABLE)
-
- $(EXECUTABLE): $(OBJECTS)
- $(CPP) $(LDFLAGS) $(OBJECTS) -o $@ $(LIBRARIES)
-
- .c.o:
- $(CC) $(INCLUDES) -c $(CFLAGS) $< -o $@
-
- .cpp.o:
- $(CPP) $(INCLUDES) -c $(CPPFLAGS) $< -o $@
-
- debug: $(EXECUTABLE)
- gdb $(EXECUTABLE)
-
- run: $(EXECUTABLE)
- ./$(EXECUTABLE)
|