summaryrefslogtreecommitdiff
path: root/Makefile
blob: 4a6b4bfefc7c5f1ef426a1549987ba091d03a04b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
CC = gcc
CFLAGS = -ggdb -std=c99 -pedantic -Wall `pkg-config --cflags gtk+-2.0 glib-2.0`
LDFLAGS = `pkg-config --libs gtk+-2.0 glib-2.0` -lm

PROGS = wimmel wimmel_gl
OBJS = wimmel.o wimmel_gl.o util.o

all: $(PROGS)

wimmel: wimmel.o util.o
wimmel_gl: wimmel_gl.o

.PHONY: clean all

%:
	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $+

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


wimmel_gl:
	$(CC) -lglut `pkg-config --cflags --libs gtk+-2.0 glib-2.0` -o $@ $+



clean:
	rm -f $(PROGS) $(OBJS)