summaryrefslogtreecommitdiff
path: root/Makefile
blob: 2e0fd6348dad593005397f5c99da6fcaffb47f3d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
CC = g++
CFLAGS = -Wall -g $(shell sdl-config --cflags)
LDFLAGS = $(shell sdl-config --libs) -lGL -lGLU# -lGLcore
TARGET = foo
OBJECTS = shader.o main.o

all: $(TARGET)

$(TARGET): $(SHADERHEADERS) $(OBJECTS)
	$(CC) $(LDFLAGS) -o $@ $^

main.o: $(SHADERHEADERS)

%.o: %.cpp
	$(CC) $(CFLAGS) -c -o $@ $<

%.o: %.cpp %.h
	$(CC) $(CFLAGS) -c -o $@ $<

clean:
	rm -f $(TARGET) $(OBJECTS) $(SHADERHEADERS)