diff options
| author | Radosław Kujawa <radoslaw.kujawa@c0ff33.net> | 2026-08-02 22:04:06 +0200 |
|---|---|---|
| committer | Radosław Kujawa <radoslaw.kujawa@c0ff33.net> | 2026-08-02 22:04:32 +0200 |
| commit | 56e89c9e4fb00b5c2af4536d4c50294608d0c46c (patch) | |
| tree | b247c62b317ce11e8c26e5b311a16cfae2f7d9c9 /examples/Makefile | |
| parent | afc74a01283fad7dfbbd670a535e68d90de7ed9a (diff) | |
Diffstat (limited to 'examples/Makefile')
| -rw-r--r-- | examples/Makefile | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/examples/Makefile b/examples/Makefile index ee05725..9d70dc5 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -1,11 +1,14 @@ -# Build the verite-gl example programs against the in-tree libGL - -CC ?= cc -CFLAGS ?= -O2 -mcpu=603e -fsigned-char -fno-strict-aliasing -ffast-math TOP = .. + +-include $(TOP)/configs/current + +CC ?= cc +CFLAGS ?= -O2 -mcpu=603e -fsigned-char -fno-strict-aliasing -ffast-math +GL_LIB_NAME ?= libGL.a +APP_LIB_DEPS ?= $(TOP)/lib/$(GL_LIB_NAME) -lm + GLINC = -I$(TOP)/include -LIBGL = $(TOP)/lib/libGL.a -LIBS = -lm +LIBGL = $(TOP)/lib/$(GL_LIB_NAME) PROGS = cube rave teapot @@ -13,10 +16,10 @@ PROGS = cube rave teapot all: $(PROGS) $(PROGS): %: %.c $(LIBGL) - $(CC) $(CFLAGS) $(GLINC) $< $(LIBGL) $(LIBS) -o $@ + $(CC) $(CFLAGS) $(GLINC) $< $(APP_LIB_DEPS) -o $@ teapot: teapot_data.inc clean: - rm -f $(PROGS) - + rm -f $(PROGS) *.d + rm -rf $(PROGS:%=%.dSYM) |
