<commit_before># src/gallium/state_trackers/es/Makefile

# Build the ES 1/2 state tracker libraries
# This consists of core Mesa ES, plus GL/gallium state tracker.

TOP = ../../../..
include $(TOP)/configs/current

GLES_1_VERSION_MAJOR = 1
GLES_1_VERSION_MINOR = 1
GLES_1_VERSION_PATCH = 0

GLES_2_VERSION_MAJOR = 2
GLES_2_VERSION_MINOR = 0
GLES_2_VERSION_PATCH = 0


# Maybe move these into configs/default:
GLES_1_LIB = GLESv1_CM
GLES_1_LIB_NAME = lib$(GLES_1_LIB).so
GLES_2_LIB = GLESv2
GLES_2_LIB_NAME = lib$(GLES_2_LIB).so


ES1_OBJECTS = st_es1.o
ES2_OBJECTS = st_es2.o


ES1_LIBS = \
	$(TOP)/src/mesa/es/libes1gallium.a \
	$(TOP)/src/mesa/es/libes1api.a

ES2_LIBS = \
	$(TOP)/src/mesa/es/libes2gallium.a \
	$(TOP)/src/mesa/es/libes2api.a

SYS_LIBS = -lm -pthread


INCLUDE_DIRS = \
	-I$(TOP)/src/gallium/include

.c.o:
	$(CC) -c $(INCLUDE_DIRS) $(DEFINES) $(CFLAGS) $< -o $@


# Default: make both GL ES 1.1 and GL ES 2.0 libraries
default: $(TOP)/$(LIB_DIR)/$(GLES_1_LIB_NAME) $(TOP)/$(LIB_DIR)/$(GLES_2_LIB_NAME)

# Make the shared libs
$(TOP)/$(LIB_DIR)/$(GLES_1_LIB_NAME): $(ES1_OBJECTS) $(ES1_LIBS) $(GALLIUM_AUXILIARIES)
	$(MKLIB) -o $(GLES_1_LIB) \
		-major $(GLES_1_VERSION_MAJOR) \
		-minor $(GLES_1_VERSION_MINOR) \
		-patch $(GLES_1_VERSION_PATCH) \
		-install $(TOP)/$(LIB_DIR) $(MKLIB_OPTIONS) \
		$(ES1_OBJECTS) \
		-Wl,--whole-archive $(ES1_LIBS) -Wl,--no-whole-archive \
		$(GALLIUM_AUXILIARIES) $(SYS_LIBS)

$(TOP)/$(LIB_DIR)/$(GLES_2_LIB_NAME): $(ES2_OBJECTS) $(ES1_LIBS) $(GALLIUM_AUXILIARIES)
	$(MKLIB) -o $(GLES_2_LIB) \
		-major $(GLES_2_VERSION_MAJOR) \
		-minor $(GLES_2_VERSION_MINOR) \
		-patch $(GLES_2_VERSION_PATCH) \
		-install $(TOP)/$(LIB_DIR) $(MKLIB_OPTIONS) \
		$(ES2_OBJECTS) \
		-Wl,--whole-archive $(ES2_LIBS) -Wl,--no-whole-archive \
		$(GALLIUM_AUXILIARIES) $(SYS_LIBS)
<commit_msg>st/es: Pass -linker and -ldflags to mklib.<commit_after># src/gallium/state_trackers/es/Makefile

# Build the ES 1/2 state tracker libraries
# This consists of core Mesa ES, plus GL/gallium state tracker.

TOP = ../../../..
include $(TOP)/configs/current

GLES_1_VERSION_MAJOR = 1
GLES_1_VERSION_MINOR = 1
GLES_1_VERSION_PATCH = 0

GLES_2_VERSION_MAJOR = 2
GLES_2_VERSION_MINOR = 0
GLES_2_VERSION_PATCH = 0


# Maybe move these into configs/default:
GLES_1_LIB = GLESv1_CM
GLES_1_LIB_NAME = lib$(GLES_1_LIB).so
GLES_2_LIB = GLESv2
GLES_2_LIB_NAME = lib$(GLES_2_LIB).so


ES1_OBJECTS = st_es1.o
ES2_OBJECTS = st_es2.o


ES1_LIBS = \
	$(TOP)/src/mesa/es/libes1gallium.a \
	$(TOP)/src/mesa/es/libes1api.a

ES2_LIBS = \
	$(TOP)/src/mesa/es/libes2gallium.a \
	$(TOP)/src/mesa/es/libes2api.a

SYS_LIBS = -lm -pthread


INCLUDE_DIRS = \
	-I$(TOP)/src/gallium/include

.c.o:
	$(CC) -c $(INCLUDE_DIRS) $(DEFINES) $(CFLAGS) $< -o $@


# Default: make both GL ES 1.1 and GL ES 2.0 libraries
default: $(TOP)/$(LIB_DIR)/$(GLES_1_LIB_NAME) $(TOP)/$(LIB_DIR)/$(GLES_2_LIB_NAME)

# Make the shared libs
$(TOP)/$(LIB_DIR)/$(GLES_1_LIB_NAME): $(ES1_OBJECTS) $(ES1_LIBS) $(GALLIUM_AUXILIARIES)
	$(MKLIB) -o $(GLES_1_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
		-major $(GLES_1_VERSION_MAJOR) \
		-minor $(GLES_1_VERSION_MINOR) \
		-patch $(GLES_1_VERSION_PATCH) \
		-install $(TOP)/$(LIB_DIR) $(MKLIB_OPTIONS) \
		$(ES1_OBJECTS) \
		-Wl,--whole-archive $(ES1_LIBS) -Wl,--no-whole-archive \
		$(GALLIUM_AUXILIARIES) $(SYS_LIBS)

$(TOP)/$(LIB_DIR)/$(GLES_2_LIB_NAME): $(ES2_OBJECTS) $(ES1_LIBS) $(GALLIUM_AUXILIARIES)
	$(MKLIB) -o $(GLES_2_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
		-major $(GLES_2_VERSION_MAJOR) \
		-minor $(GLES_2_VERSION_MINOR) \
		-patch $(GLES_2_VERSION_PATCH) \
		-install $(TOP)/$(LIB_DIR) $(MKLIB_OPTIONS) \
		$(ES2_OBJECTS) \
		-Wl,--whole-archive $(ES2_LIBS) -Wl,--no-whole-archive \
		$(GALLIUM_AUXILIARIES) $(SYS_LIBS)

{'fraction_non_alphanumeric': 0.1761892107361148, 'fraction_numerical': 0.0297634865798565, 'mean_word_length': 4.293952180028129, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3854691', 'n_tokens_mistral': 1869, 'n_tokens_neox': 1746, 'n_words': 276}