1
0
mirror of synced 2024-11-30 20:24:27 +01:00
lindbergh-loader/Makefile

37 lines
1.1 KiB
Makefile
Raw Permalink Normal View History

2022-07-07 14:34:29 +02:00
CC=gcc -m32
2023-11-20 20:55:32 +01:00
CFLAGS = -g -O0 -fPIC -m32 -Wall -Werror -Wno-unused-variable -Wno-unused-function
2022-07-07 14:34:29 +02:00
LD = g++ -m32
LDFLAGS = -Wl,-z,defs -rdynamic -static-libstdc++ -static-libgcc -lc -ldl -lGL -lglut -lX11 -lm -lpthread -shared -nostdlib
BUILD = build
OBJS := $(patsubst %.c,%.o,$(wildcard src/lindbergh/*.c))
2023-12-28 22:56:37 +01:00
all: lindbergh lindbergh.so libsegaapi.so libkswapapi.so
lindbergh: src/lindbergh/lindbergh.c
mkdir -p $(BUILD)
$(CC) src/lindbergh/lindbergh.c -o $(BUILD)/lindbergh
2022-07-07 14:34:29 +02:00
lindbergh.so: $(OBJS)
mkdir -p $(BUILD)
$(LD) $(OBJS) $(LDFLAGS) $(CFLAGS) -o $(BUILD)/lindbergh.so
rm -f src/lindbergh/*.o
2022-07-28 13:43:10 +02:00
LIBSEGA_LD=gcc #clang
LIBSEGA_LDFLAGS=-m32 -O0 -g
libsegaapi.so: src/libsegaapi/segaapi.o
$(LIBSEGA_LD) $(LIBSEGA_LDFLAGS) src/libsegaapi/segaapi.o -L/usr/lib/i386-linux-gnu -lalut -fPIC -shared -o $(BUILD)/libsegaapi.so
rm -f src/libsegaapi/*.o
2023-07-07 00:09:38 +02:00
libkswapapi.so: src/libkswapapi/libkswapapi.o
$(LIBSEGA_LD) $(LIBSEGA_LDFLAGS) src/libkswapapi/libkswapapi.o -L/usr/lib/i386-linux-gnu -fPIC -shared -o $(BUILD)/libkswapapi.so
2023-12-28 22:56:37 +01:00
rm -f src/libkswapapi/*.o
2023-07-07 00:09:38 +02:00
2022-07-07 14:34:29 +02:00
clean:
rm -rf $(BUILD)
2023-12-12 16:27:37 +01:00
rm -f src/lindbergh/*.o
rm -f src/libsegaapi/*.o
2023-12-28 22:56:37 +01:00
rm -f src/libkswapapi/*.o