diff options
Diffstat (limited to 'examples')
| -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) |
