adding my fucking makefile

This commit is contained in:
2026-01-31 14:41:29 -06:00
parent 6856f6f2c8
commit a0bcabe574
8 changed files with 997 additions and 0 deletions

34
SDL2_ttf/external/freetype/Makefile vendored Normal file
View File

@@ -0,0 +1,34 @@
#
# FreeType 2 build system -- top-level Makefile
#
# Copyright (C) 1996-2023 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
# and distributed under the terms of the FreeType project license,
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
# indicate that you have read the license and understand and accept it
# fully.
# Project names
#
PROJECT := freetype
PROJECT_TITLE := FreeType
# The variable TOP_DIR holds the path to the topmost directory in the project
# engine source hierarchy. If it is not defined, default it to `.'.
#
TOP_DIR ?= .
# The variable OBJ_DIR gives the location where object files and the
# FreeType library are built.
#
OBJ_DIR ?= $(TOP_DIR)/objs
include $(TOP_DIR)/builds/toplevel.mk
# EOF

View File

@@ -0,0 +1,45 @@
# TOP_DIR and OBJ_DIR should be set by the user to the right directories,
# if necessary.
TOP_DIR ?= ../../..
OBJ_DIR ?= $(TOP_DIR)/objs
# The setup below is for gcc on a Unix-like platform,
# where FreeType has been set up to create a static library
# (which is the default).
VPATH = $(OBJ_DIR) \
$(OBJ_DIR)/.libs
SRC_DIR = $(TOP_DIR)/src/tools/ftrandom
CC = gcc
WFLAGS = -Wmissing-prototypes \
-Wunused \
-Wimplicit \
-Wreturn-type \
-Wparentheses \
-pedantic \
-Wformat \
-Wchar-subscripts \
-Wsequence-point
CFLAGS = $(WFLAGS) \
-g
INCLUDES = -I $(TOP_DIR)/include
LDFLAGS =
LIBS = -lm \
-lz \
-lpng \
-lbz2 \
-lharfbuzz
all: $(OBJ_DIR)/ftrandom
$(OBJ_DIR)/ftrandom.o: $(SRC_DIR)/ftrandom.c
$(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $<
$(OBJ_DIR)/ftrandom: $(OBJ_DIR)/ftrandom.o libfreetype.a
$(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
# EOF

View File

@@ -0,0 +1,28 @@
FONTS = CharisSIL-R.wasm.ttf Scheherazade-R.wasm.ttf AwamiNastaliq-Regular.wasm.ttf
ADD_TABLE = ../../addTable.py
all: $(FONTS)
%.wasm: %.cc ../../hb-wasm-api.h
emcc \
-I ../.. \
-I ~/graphite/include/ \
-fvisibility=hidden \
-Wl,--allow-undefined \
-Wl,--no-entry \
-Wl,--strip-all \
-sERROR_ON_UNDEFINED_SYMBOLS=0 \
-Wl,--export=malloc -Wl,--export=free \
~/graphite/src/libgraphite2.a \
~/wasm/wasi-sdk-19.0/share/wasi-sysroot/lib/wasm32-wasi/libc.a \
$< \
-o $@
%.wasm.ttf: %.ttf shape.wasm $(ADD_TABLE)
python $(ADD_TABLE) $< $@ shape.wasm
clean:
$(RM) shape.wasm $(FONTS)
.PRECIOUS: shape.wasm

View File

@@ -0,0 +1,25 @@
ADD_TABLE = ../../../addTable.py
all: test-fallback.wasm.ttf test-ot.wasm.ttf
%.wasm: %.cc ../../../hb-wasm-api.h
clang \
--target=wasm32-unknown-wasi \
-Wl,--no-entry \
-fvisibility=hidden \
-Wl,--allow-undefined \
-nostdlib \
-I ../../.. \
$< \
-o $@
test-fallback.wasm.ttf: test.ttf shape-fallback.wasm $(ADD_TABLE)
python $(ADD_TABLE) $< $@ shape-fallback.wasm
test-ot.wasm.ttf: test.ttf shape-ot.wasm $(ADD_TABLE)
python $(ADD_TABLE) $< $@ shape-ot.wasm
clean:
$(RM) test-fallback.wasm.ttf test-ot.wasm.ttf shape-fallback.wasm shape-ot.wasm
.PRECIOUS: *.wasm