2018-10-28 11:36:21 +03:00
|
|
|
AK_OBJS = \
|
|
|
|
../AK/StringImpl.o \
|
|
|
|
../AK/String.o \
|
|
|
|
../AK/StringBuilder.o \
|
|
|
|
../AK/FileSystemPath.o \
|
2019-02-07 10:46:52 +03:00
|
|
|
../AK/StdLibExtras.o \
|
2018-10-28 11:36:21 +03:00
|
|
|
../AK/kmalloc.o
|
|
|
|
|
|
|
|
LIBC_OBJS = \
|
2019-03-08 14:22:55 +03:00
|
|
|
SharedBuffer.o \
|
2018-10-22 14:57:25 +03:00
|
|
|
stdio.o \
|
2018-10-22 15:06:22 +03:00
|
|
|
unistd.o \
|
2018-10-23 11:12:50 +03:00
|
|
|
string.o \
|
2019-02-24 17:19:32 +03:00
|
|
|
strings.o \
|
2018-10-24 10:48:24 +03:00
|
|
|
mman.o \
|
2018-10-24 13:43:52 +03:00
|
|
|
dirent.o \
|
|
|
|
stdlib.o \
|
2018-10-25 18:29:49 +03:00
|
|
|
time.o \
|
2018-10-26 15:56:21 +03:00
|
|
|
utsname.o \
|
2018-10-28 11:36:21 +03:00
|
|
|
assert.o \
|
2018-10-31 03:06:57 +03:00
|
|
|
signal.o \
|
2018-10-31 19:50:43 +03:00
|
|
|
getopt.o \
|
|
|
|
scanf.o \
|
2018-10-31 21:49:22 +03:00
|
|
|
pwd.o \
|
2018-11-07 00:27:51 +03:00
|
|
|
grp.o \
|
2018-11-05 18:40:48 +03:00
|
|
|
times.o \
|
2018-11-05 20:16:00 +03:00
|
|
|
termcap.o \
|
2018-11-06 15:40:23 +03:00
|
|
|
stat.o \
|
2018-11-07 12:23:16 +03:00
|
|
|
mntent.o \
|
2018-11-11 02:44:04 +03:00
|
|
|
ctype.o \
|
2018-11-11 12:38:33 +03:00
|
|
|
fcntl.o \
|
|
|
|
termios.o \
|
2018-11-11 17:36:40 +03:00
|
|
|
ulimit.o \
|
|
|
|
qsort.o \
|
2018-11-16 15:11:21 +03:00
|
|
|
ioctl.o \
|
2018-12-19 23:14:55 +03:00
|
|
|
utime.o \
|
2019-01-16 01:12:20 +03:00
|
|
|
sys/select.o \
|
2019-02-14 17:26:06 +03:00
|
|
|
sys/socket.o \
|
2019-02-24 17:19:32 +03:00
|
|
|
sys/wait.o \
|
2019-01-23 09:27:41 +03:00
|
|
|
poll.o \
|
2019-02-08 04:38:21 +03:00
|
|
|
locale.o \
|
2019-03-12 17:51:42 +03:00
|
|
|
arpa/inet.o \
|
2019-02-22 11:21:54 +03:00
|
|
|
crt0.o
|
2018-10-22 14:57:25 +03:00
|
|
|
|
2019-02-08 03:24:52 +03:00
|
|
|
ASM_OBJS = setjmp.no
|
|
|
|
|
2019-02-22 12:45:32 +03:00
|
|
|
CPP_OBJS = $(AK_OBJS) $(WIDGETS_OBJS) $(LIBC_OBJS)
|
2018-10-28 11:36:21 +03:00
|
|
|
|
2019-02-26 15:30:57 +03:00
|
|
|
LIBRARY = libc.a
|
2019-02-22 16:43:12 +03:00
|
|
|
STANDARD_FLAGS = -std=c++17
|
2019-02-15 14:39:16 +03:00
|
|
|
WARNING_FLAGS = -Wextra -Wall -Wundef -Wcast-qual -Wwrite-strings -Wimplicit-fallthrough
|
2019-02-22 12:45:32 +03:00
|
|
|
FLAVOR_FLAGS = -fno-exceptions -fno-rtti
|
2019-02-17 17:17:21 +03:00
|
|
|
OPTIMIZATION_FLAGS = -Os
|
2018-10-22 14:57:25 +03:00
|
|
|
INCLUDE_FLAGS = -I.. -I.
|
|
|
|
|
2018-10-28 11:36:21 +03:00
|
|
|
DEFINES = -DSERENITY -DUSERLAND -DSANITIZE_PTRS
|
2018-10-22 14:57:25 +03:00
|
|
|
|
2019-02-22 16:43:12 +03:00
|
|
|
CXXFLAGS = -MMD -MP $(WARNING_FLAGS) $(OPTIMIZATION_FLAGS) $(FLAVOR_FLAGS) $(STANDARD_FLAGS) $(INCLUDE_FLAGS) $(DEFINES)
|
|
|
|
CXX = i686-pc-serenity-g++
|
|
|
|
LD = i686-pc-serenity-ld
|
|
|
|
AR = i686-pc-serenity-ar
|
2018-10-22 14:57:25 +03:00
|
|
|
|
|
|
|
all: $(LIBRARY)
|
|
|
|
|
2019-02-08 03:24:52 +03:00
|
|
|
$(LIBRARY): $(CPP_OBJS) $(ASM_OBJS)
|
|
|
|
@echo "LIB $@"; $(AR) rcs $@ $(CPP_OBJS) $(ASM_OBJS)
|
2018-10-22 14:57:25 +03:00
|
|
|
|
|
|
|
.cpp.o:
|
|
|
|
@echo "CXX $<"; $(CXX) $(CXXFLAGS) -o $@ -c $<
|
|
|
|
|
2019-02-08 03:24:52 +03:00
|
|
|
%.no: %.asm
|
|
|
|
@echo "NASM $@"; nasm -f elf -o $@ $<
|
|
|
|
|
2019-02-02 06:41:59 +03:00
|
|
|
-include $(OBJS:%.o=%.d)
|
|
|
|
|
2018-10-22 14:57:25 +03:00
|
|
|
clean:
|
2019-02-08 03:24:52 +03:00
|
|
|
@echo "CLEAN"; rm -f $(LIBRARY) $(CPP_OBJS) $(ASM_OBJS) *.d
|
2018-10-22 14:57:25 +03:00
|
|
|
|