1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-09-09 21:00:17 +00:00
QB64-PE/internal/c/parts/core/build.mk

36 lines
1.3 KiB
Makefile
Raw Normal View History

2022-04-29 04:40:57 +00:00
# GLEW Setup:
# Download the latest GLEW source release from https://github.com/nigels-com/glew/releases/latest
# Only copy glew.c in src/ to internal/c/parts/core/glew
# Copy the include directory to internal/c/parts/core/glew
# Compile the source using -DGLEW_STATIC
2024-01-21 22:19:46 +00:00
#
# FreeGLUT Setup:
# Although newer version of FreeGLUT (3.x) are available we do not use those.
# This is because the local version has quite a few custom changes that should be moved out.
FREEGLUT_SRCS := \
2024-01-21 22:19:46 +00:00
$(wildcard $(PATH_INTERNAL_C)/parts/core/freeglut/*.c) \
$(wildcard $(PATH_INTERNAL_C)/parts/core/glew/*.c)
2024-01-21 22:19:46 +00:00
FREEGLUT_INCLUDE := -I$(PATH_INTERNAL_C)/parts/core/freeglut/include -I$(PATH_INTERNAL_C)/parts/core/glew/include
2022-04-29 04:40:57 +00:00
FREEGLUT_OBJS := $(FREEGLUT_SRCS:.c=.o)
2024-01-21 22:19:46 +00:00
FREEGLUT_LIB := $(PATH_INTERNAL_C)/parts/core/freeglut.a
2022-04-29 04:40:57 +00:00
$(PATH_INTERNAL_C)/parts/core/glew/%.o: $(PATH_INTERNAL_C)/parts/core/glew/%.c
$(CC) -O3 $(CFLAGS) $(FREEGLUT_INCLUDE) -DGLEW_STATIC -Wall $< -c -o $@
2024-01-21 22:19:46 +00:00
$(PATH_INTERNAL_C)/parts/core/freeglut/%.o: $(PATH_INTERNAL_C)/parts/core/freeglut/%.c
$(CC) -O3 $(CFLAGS) $(FREEGLUT_INCLUDE) -DFREEGLUT_STATIC -DHAVE_UNISTD_H -Wall $< -c -o $@
2022-04-29 04:40:57 +00:00
$(FREEGLUT_LIB): $(FREEGLUT_OBJS)
$(AR) rcs $@ $(FREEGLUT_OBJS)
QB_CORE_LIB := $(FREEGLUT_LIB)
CXXFLAGS += $(FREEGLUT_INCLUDE)
2022-04-29 04:40:57 +00:00
CLEAN_LIST += $(FREEGLUT_LIB) $(FREEGLUT_OBJS)