53 lines
1.3 KiB
Text
53 lines
1.3 KiB
Text
ifndef MAKEFILE_TIGER_INCLUDED
|
|
MAKEFILE_TIGER_INCLUDED := 1
|
|
|
|
.PHONY: tiger.bin tiger.clean
|
|
|
|
include build/common.inc
|
|
|
|
#
|
|
# tiger
|
|
#
|
|
|
|
include Makefile.regal
|
|
include Makefile.glew
|
|
|
|
ifndef REGAL.STATIC
|
|
$(error tiger needs Regal.)
|
|
endif
|
|
|
|
all:: tiger.bin
|
|
|
|
clean:: tiger.clean
|
|
|
|
tiger.bin: bin/$(SYSTEM)/tiger
|
|
|
|
tiger.clean:
|
|
$(RM) -r tmp/$(SYSTEM)/tiger/static
|
|
$(RM) -r bin/$(SYSTEM)/tiger
|
|
|
|
TIGER.SRCS += examples/tiger/nvpr_tiger.c
|
|
TIGER.SRCS += examples/tiger/tiger.c
|
|
TIGER.SRCS += examples/tiger/xform.c
|
|
TIGER.SRCS.NAMES := $(notdir $(TIGER.SRCS))
|
|
TIGER.OBJS := $(addprefix tmp/$(SYSTEM)/tiger/static/,$(TIGER.SRCS.NAMES))
|
|
TIGER.OBJS := $(TIGER.OBJS:.c=.o)
|
|
TIGER.DEPS := $(TIGER.DEPS:.o=.d)
|
|
TIGER.CFLAGS := -Iinclude -DGLEW_NO_GLU
|
|
TIGER.LIBS += -Llib/$(SYSTEM) -lRegalGLEW $(LDFLAGS.GLUT) $(LDFLAGS.GLU) -lRegal $(LDFLAGS.X11)
|
|
TIGER.LIBS += -lm -pthread
|
|
|
|
-include $(TIGER.DEPS)
|
|
|
|
tmp/$(SYSTEM)/tiger/static/%.o: examples/tiger/%.c
|
|
@mkdir -p $(dir $@)
|
|
$(LOG_CC)$(CCACHE) $(CC) $(TIGER.CFLAGS) $(CFLAGS) $(CFLAGS.SO) -o $@ -c $<
|
|
|
|
bin/$(SYSTEM)/tiger: $(TIGER.OBJS) lib/$(SYSTEM)/$(GLEW.SHARED) lib/$(SYSTEM)/$(REGAL.SHARED)
|
|
@mkdir -p $(dir $@)
|
|
$(LOG_LD)$(CCACHE) $(LD) $(LDFLAGS.EXTRA) -o $@ $(TIGER.OBJS) $(TIGER.LIBS)
|
|
ifneq ($(STRIP),)
|
|
$(LOG_STRIP)$(STRIP) -x $@
|
|
endif
|
|
|
|
endif
|