summaryrefslogtreecommitdiff
path: root/examples/Makefile.example
blob: 92e6a629252baf6ed953cace94c703f0c6f72c86 (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
EXES := gl_basic simple-x11-egl
CFLAGS += -std=c99 $(shell pkg-config --cflags waffle-1)
LDFLAGS += $(shell pkg-config --libs waffle-1)

ifeq ($(shell uname),Darwin)
    EXES := $(filter-out simple-x11-egl,$(EXES))
    CFLAGS += -ObjC
    LDFLAGS += \
        -framework Cocoa \
        -framework CoreFoundation \
        -framework OpenGL
endif

.PHONY: all
all: $(EXES)

.PHONY: clean
clean:
	-rm $(EXES)

gl_basic: gl_basic.c
	$(CC) $(CFLAGS) $(LDFLAGS) -o gl_basic gl_basic.c

simple-x11-egl: simple-x11-egl.c
	$(CC) $(CFLAGS) $(LDFLAGS) -o simple-x11-egl simple-x11-egl.c