2018-10-28 09:36:21 +01:00
|
|
|
AK_OBJS = \
|
|
|
|
../AK/StringImpl.o \
|
|
|
|
../AK/String.o \
|
|
|
|
../AK/StringBuilder.o \
|
|
|
|
../AK/FileSystemPath.o \
|
2019-02-07 08:46:52 +01:00
|
|
|
../AK/StdLibExtras.o \
|
2018-10-28 09:36:21 +01:00
|
|
|
../AK/kmalloc.o
|
|
|
|
|
2019-01-19 23:22:46 +01:00
|
|
|
SHAREDGRAPHICS_OBJS = \
|
|
|
|
../SharedGraphics/Painter.o \
|
|
|
|
../SharedGraphics/Font.o \
|
|
|
|
../SharedGraphics/Rect.o \
|
|
|
|
../SharedGraphics/GraphicsBitmap.o \
|
|
|
|
../SharedGraphics/CharacterBitmap.o \
|
|
|
|
../SharedGraphics/Color.o
|
2019-01-14 15:25:34 +01:00
|
|
|
|
2018-10-28 09:36:21 +01:00
|
|
|
LIBC_OBJS = \
|
2018-10-22 13:57:25 +02:00
|
|
|
stdio.o \
|
2018-10-22 14:06:22 +02:00
|
|
|
unistd.o \
|
2018-10-23 10:12:50 +02:00
|
|
|
string.o \
|
2018-10-24 09:48:24 +02:00
|
|
|
mman.o \
|
2018-10-24 12:43:52 +02:00
|
|
|
dirent.o \
|
|
|
|
stdlib.o \
|
2018-10-25 17:29:49 +02:00
|
|
|
time.o \
|
2018-10-26 14:56:21 +02:00
|
|
|
utsname.o \
|
2018-10-28 09:36:21 +01:00
|
|
|
assert.o \
|
2018-10-31 01:06:57 +01:00
|
|
|
signal.o \
|
2018-10-31 17:50:43 +01:00
|
|
|
getopt.o \
|
|
|
|
scanf.o \
|
2018-10-31 19:49:22 +01:00
|
|
|
pwd.o \
|
2018-11-06 22:27:51 +01:00
|
|
|
grp.o \
|
2018-11-05 16:40:48 +01:00
|
|
|
times.o \
|
2018-11-05 18:16:00 +01:00
|
|
|
termcap.o \
|
|
|
|
setjmp.o \
|
2018-11-06 13:40:23 +01:00
|
|
|
stat.o \
|
2018-11-07 10:23:16 +01:00
|
|
|
mntent.o \
|
2018-11-11 00:44:04 +01:00
|
|
|
ctype.o \
|
2018-11-11 10:38:33 +01:00
|
|
|
fcntl.o \
|
|
|
|
termios.o \
|
2018-11-11 15:36:40 +01:00
|
|
|
ulimit.o \
|
|
|
|
qsort.o \
|
2018-11-16 13:11:21 +01:00
|
|
|
ioctl.o \
|
2018-11-17 00:11:08 +01:00
|
|
|
math.o \
|
2018-12-19 21:14:55 +01:00
|
|
|
utime.o \
|
2019-01-14 20:00:42 +01:00
|
|
|
gui.o \
|
2019-01-15 23:12:20 +01:00
|
|
|
sys/select.o \
|
2019-01-23 07:27:41 +01:00
|
|
|
poll.o \
|
2018-10-22 14:06:22 +02:00
|
|
|
entry.o
|
2018-10-22 13:57:25 +02:00
|
|
|
|
2019-01-19 23:22:46 +01:00
|
|
|
OBJS = $(AK_OBJS) $(WIDGETS_OBJS) $(LIBC_OBJS) $(SHAREDGRAPHICS_OBJS)
|
2018-10-28 09:36:21 +01:00
|
|
|
|
2018-10-22 13:57:25 +02:00
|
|
|
LIBRARY = LibC.a
|
|
|
|
ARCH_FLAGS =
|
2018-10-31 02:09:11 +01:00
|
|
|
STANDARD_FLAGS = -std=c++17 -nostdinc++ -nostdlib -nostdinc
|
2018-10-22 13:57:25 +02:00
|
|
|
LIBC_FLAGS = -ffreestanding -fno-stack-protector -fno-ident
|
|
|
|
WARNING_FLAGS = -Wextra -Wall -Wundef -Wcast-qual -Wwrite-strings
|
2018-11-09 14:29:00 +01:00
|
|
|
FLAVOR_FLAGS = -fomit-frame-pointer -mregparm=3 -march=i386 -m32 -fno-exceptions -fno-rtti -ffunction-sections -fdata-sections -fmerge-all-constants -fno-unroll-loops -fno-pie -fno-pic
|
2019-02-06 14:48:09 +01:00
|
|
|
OPTIMIZATION_FLAGS = -O2 -fno-asynchronous-unwind-tables
|
2018-10-22 13:57:25 +02:00
|
|
|
INCLUDE_FLAGS = -I.. -I.
|
|
|
|
|
2018-10-28 09:36:21 +01:00
|
|
|
DEFINES = -DSERENITY -DUSERLAND -DSANITIZE_PTRS
|
2018-10-22 13:57:25 +02:00
|
|
|
|
2019-02-02 04:41:59 +01:00
|
|
|
CXXFLAGS = -MMD -MP $(WARNING_FLAGS) $(OPTIMIZATION_FLAGS) $(LIBC_FLAGS) $(FLAVOR_FLAGS) $(ARCH_FLAGS) $(STANDARD_FLAGS) $(INCLUDE_FLAGS) $(DEFINES)
|
2018-11-09 14:29:00 +01:00
|
|
|
CXX = clang
|
2018-10-22 13:57:25 +02:00
|
|
|
LD = ld
|
|
|
|
AR = ar
|
2019-02-06 14:48:09 +01:00
|
|
|
LDFLAGS = -T linker.ld --strip-debug -melf_i386 --gc-sections
|
2018-10-22 13:57:25 +02:00
|
|
|
|
|
|
|
all: $(LIBRARY)
|
|
|
|
|
|
|
|
$(LIBRARY): $(OBJS)
|
|
|
|
@echo "LIB $@"; $(AR) rcs $@ $(OBJS)
|
|
|
|
|
|
|
|
.cpp.o:
|
|
|
|
@echo "CXX $<"; $(CXX) $(CXXFLAGS) -o $@ -c $<
|
|
|
|
|
2019-02-02 04:41:59 +01:00
|
|
|
-include $(OBJS:%.o=%.d)
|
|
|
|
|
2018-10-22 13:57:25 +02:00
|
|
|
clean:
|
2019-02-02 04:41:59 +01:00
|
|
|
@echo "CLEAN"; rm -f $(LIBRARY) $(OBJS) *.d
|
2018-10-22 13:57:25 +02:00
|
|
|
|