1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
| | From da31e9bb1abd95d81b4d4eb18888e41c30092fb9 Mon Sep 17 00:00:00 2001
From: AwesomeAdam54321 <adam.faiz@disroot.org>
Date: Sun, 12 Mar 2023 00:47:56 +0800
Subject: [PATCH] futil: add makefile.
Adapted from https://gitlab.com/hydren/terrarium/-/raw/master/build/linux-gcc-sdl2-release/src_libs/futil/subdir.mk
---
Makefile | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 72 insertions(+)
create mode 100644 Makefile
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..a97ea48
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,72 @@
+################################################################################
+# Automatically-generated file. Do not edit!
+################################################################################
+
+# Add inputs and outputs from these tool invocations to the build variables
+CPP_SRCS += \
+exception.cpp \
+properties.cpp \
+stox.cpp \
+string_actions.cpp \
+string_extra_operators.cpp \
+string_parse.cpp \
+string_split.cpp
+
+C_SRCS += \
+chrono.c \
+random.c \
+round.c \
+snprintf.c \
+strtox.c
+
+OBJS += \
+chrono.o \
+exception.o \
+properties.o \
+random.o \
+round.o \
+snprintf.o \
+stox.o \
+string_actions.o \
+string_extra_operators.o \
+string_parse.o \
+string_split.o \
+strtox.o
+
+SRCDIR ?= .
+INCLUDE_PATH ?= ${SRCDIR}/include
+PREFIX ?= /usr/local
+CFLAGS = -O3 -Wall -fPIC -c -fmessage-length=0 -MMD -MP
+
+all: libfutil.so
+
+libfutil.so: $(OBJS) $(USER_OBJS)
+ @echo 'Building target: $@'
+ @echo 'Invoking: GCC C++ Linker'
+ g++ -shared -o "libfutil.so" $(OBJS) $(USER_OBJS) $(LIBS)
+ @echo 'Finished building target: $@'
+ @echo ' '
+
+install: all
+ install -d $(DESTDIR)$(PREFIX)
+ cp -r include $(DESTDIR)$(PREFIX)
+ install -d $(DESTDIR)$(PREFIX)/lib
+ install -m 644 libfutil.so $(DESTDIR)$(PREFIX)/lib
+
+%.o: %.c
+ @echo 'Building file: $<'
+ @echo 'Invoking: GCC C Compiler'
+ gcc -I${INCLUDE_PATH} $(CFLAGS) -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<"
+ @echo 'Finished building: $<'
+ @echo ' '
+
+%.o: %.cpp
+ @echo 'Building file: $<'
+ @echo 'Invoking: GCC C++ Compiler'
+ g++ -I${INCLUDE_PATH} $(CFLAGS) -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<"
+ @echo 'Finished building: $<'
+ @echo ' '
+
+clean:
+ rm $(wildcard *.o) libfutil.so
+
--
2.39.2
|