2018-10-22 15:06:22 +03:00
|
|
|
OBJS = \
|
2018-10-23 11:12:50 +03:00
|
|
|
id.o \
|
2018-10-23 12:57:38 +03:00
|
|
|
sh.o \
|
2018-10-24 10:48:24 +03:00
|
|
|
ps.o \
|
2018-10-24 15:28:22 +03:00
|
|
|
ls.o \
|
2018-10-25 18:29:49 +03:00
|
|
|
sleep.o \
|
2018-10-25 22:39:37 +03:00
|
|
|
date.o \
|
|
|
|
true.o \
|
2018-10-26 10:54:29 +03:00
|
|
|
false.o \
|
2018-10-26 12:16:56 +03:00
|
|
|
hostname.o \
|
2018-10-26 15:56:21 +03:00
|
|
|
cat.o \
|
2018-10-27 18:39:08 +03:00
|
|
|
uname.o \
|
2018-10-28 02:44:53 +03:00
|
|
|
clear.o \
|
2018-10-28 12:26:07 +03:00
|
|
|
tst.o \
|
2018-10-31 03:06:57 +03:00
|
|
|
mm.o \
|
2018-10-31 23:45:36 +03:00
|
|
|
kill.o \
|
2018-11-11 22:42:41 +03:00
|
|
|
fgrep.o \
|
2018-11-18 16:57:41 +03:00
|
|
|
tty.o \
|
2018-12-19 23:14:55 +03:00
|
|
|
mkdir.o \
|
2018-12-21 04:42:30 +03:00
|
|
|
touch.o \
|
2019-01-13 03:59:38 +03:00
|
|
|
more.o \
|
2019-01-20 07:48:43 +03:00
|
|
|
guitest2.o \
|
2019-01-22 09:03:44 +03:00
|
|
|
sysctl.o \
|
2019-02-08 18:19:16 +03:00
|
|
|
pape.o \
|
2019-01-27 09:18:26 +03:00
|
|
|
cp.o \
|
2019-01-28 06:16:01 +03:00
|
|
|
rmdir.o \
|
2019-01-29 00:40:55 +03:00
|
|
|
dmesg.o \
|
2019-01-29 06:55:08 +03:00
|
|
|
chmod.o \
|
2019-02-27 14:32:53 +03:00
|
|
|
chown.o \
|
2019-02-04 12:28:12 +03:00
|
|
|
top.o \
|
2019-02-21 16:48:00 +03:00
|
|
|
df.o \
|
2019-02-21 15:26:40 +03:00
|
|
|
ln.o \
|
2019-02-22 01:35:07 +03:00
|
|
|
su.o \
|
2019-02-22 03:55:22 +03:00
|
|
|
env.o \
|
2019-02-27 23:45:06 +03:00
|
|
|
stat.o \
|
2019-01-22 09:03:44 +03:00
|
|
|
rm.o
|
2018-10-22 15:06:22 +03:00
|
|
|
|
2018-10-22 15:13:17 +03:00
|
|
|
APPS = \
|
2018-10-23 11:12:50 +03:00
|
|
|
id \
|
2018-10-23 12:57:38 +03:00
|
|
|
sh \
|
2018-10-24 10:48:24 +03:00
|
|
|
ps \
|
2018-10-24 15:28:22 +03:00
|
|
|
ls \
|
2018-10-25 18:29:49 +03:00
|
|
|
sleep \
|
2018-10-25 22:39:37 +03:00
|
|
|
date \
|
|
|
|
true \
|
2018-10-26 10:54:29 +03:00
|
|
|
false \
|
2018-10-26 12:16:56 +03:00
|
|
|
hostname \
|
2018-10-26 15:56:21 +03:00
|
|
|
cat \
|
2018-10-27 18:39:08 +03:00
|
|
|
uname \
|
2018-10-28 02:44:53 +03:00
|
|
|
clear \
|
2018-10-28 12:26:07 +03:00
|
|
|
tst \
|
2018-10-31 03:06:57 +03:00
|
|
|
mm \
|
2018-10-31 23:45:36 +03:00
|
|
|
kill \
|
2018-11-11 22:42:41 +03:00
|
|
|
fgrep \
|
2018-11-18 16:57:41 +03:00
|
|
|
tty \
|
2018-12-19 23:14:55 +03:00
|
|
|
mkdir \
|
2018-12-20 02:39:29 +03:00
|
|
|
touch \
|
2018-12-21 04:42:30 +03:00
|
|
|
sync \
|
2019-01-13 03:59:38 +03:00
|
|
|
more \
|
2019-01-20 07:48:43 +03:00
|
|
|
guitest2 \
|
2019-01-22 09:03:44 +03:00
|
|
|
sysctl \
|
2019-02-08 18:19:16 +03:00
|
|
|
pape \
|
2019-01-27 09:18:26 +03:00
|
|
|
cp \
|
2019-01-28 06:16:01 +03:00
|
|
|
rmdir \
|
2019-01-29 00:40:55 +03:00
|
|
|
dmesg \
|
2019-01-29 06:55:08 +03:00
|
|
|
chmod \
|
2019-02-27 14:32:53 +03:00
|
|
|
chown \
|
2019-02-04 12:28:12 +03:00
|
|
|
top \
|
2019-02-21 15:26:40 +03:00
|
|
|
ln \
|
2019-02-21 16:48:00 +03:00
|
|
|
df \
|
2019-02-22 01:35:07 +03:00
|
|
|
su \
|
2019-02-22 03:55:22 +03:00
|
|
|
env \
|
2019-02-27 23:45:06 +03:00
|
|
|
stat \
|
2019-01-22 09:03:44 +03:00
|
|
|
rm
|
2018-10-22 15:13:17 +03:00
|
|
|
|
2018-10-22 15:06:22 +03:00
|
|
|
ARCH_FLAGS =
|
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-31 04:09:11 +03:00
|
|
|
INCLUDE_FLAGS = -I.. -I. -I../LibC
|
2018-10-22 15:06:22 +03:00
|
|
|
|
2018-10-25 11:00:37 +03:00
|
|
|
DEFINES = -DSERENITY -DSANITIZE_PTRS -DUSERLAND
|
2018-10-22 15:06:22 +03:00
|
|
|
|
2019-02-22 16:43:12 +03:00
|
|
|
CXXFLAGS = -MMD -MP $(WARNING_FLAGS) $(OPTIMIZATION_FLAGS) $(FLAVOR_FLAGS) $(ARCH_FLAGS) $(STANDARD_FLAGS) $(INCLUDE_FLAGS) $(DEFINES)
|
|
|
|
CXX = i686-pc-serenity-g++
|
|
|
|
LD = i686-pc-serenity-ld
|
|
|
|
AR = i686-pc-serenity-r
|
2019-02-26 15:30:57 +03:00
|
|
|
LDFLAGS = -L ../LibC
|
2018-10-22 15:13:17 +03:00
|
|
|
|
|
|
|
all: $(OBJS) $(APPS)
|
2018-10-22 15:06:22 +03:00
|
|
|
|
2018-10-22 15:13:17 +03:00
|
|
|
id: id.o
|
2019-02-26 15:30:57 +03:00
|
|
|
$(LD) -o $@ $(LDFLAGS) $< -lc
|
2018-10-22 15:06:22 +03:00
|
|
|
|
2018-10-23 11:12:50 +03:00
|
|
|
sh: sh.o
|
2019-02-26 15:30:57 +03:00
|
|
|
$(LD) -o $@ $(LDFLAGS) $< -lc
|
2018-10-23 11:12:50 +03:00
|
|
|
|
2018-10-23 12:57:38 +03:00
|
|
|
ps: ps.o
|
2019-02-26 15:30:57 +03:00
|
|
|
$(LD) -o $@ $(LDFLAGS) $< -lc
|
2018-10-23 12:57:38 +03:00
|
|
|
|
2018-10-24 10:48:24 +03:00
|
|
|
ls: ls.o
|
2019-02-26 15:30:57 +03:00
|
|
|
$(LD) -o $@ $(LDFLAGS) $< -lc
|
2018-10-24 10:48:24 +03:00
|
|
|
|
2018-11-11 22:42:41 +03:00
|
|
|
fgrep: fgrep.o
|
2019-02-26 15:30:57 +03:00
|
|
|
$(LD) -o $@ $(LDFLAGS) $< -lc
|
2018-11-11 22:42:41 +03:00
|
|
|
|
2018-10-25 14:53:49 +03:00
|
|
|
sleep: sleep.o
|
2019-02-26 15:30:57 +03:00
|
|
|
$(LD) -o $@ $(LDFLAGS) $< -lc
|
2018-10-25 14:53:49 +03:00
|
|
|
|
2018-10-25 18:29:49 +03:00
|
|
|
date: date.o
|
2019-02-26 15:30:57 +03:00
|
|
|
$(LD) -o $@ $(LDFLAGS) $< -lc
|
2018-10-25 18:29:49 +03:00
|
|
|
|
2018-10-25 22:39:37 +03:00
|
|
|
true: true.o
|
2019-02-26 15:30:57 +03:00
|
|
|
$(LD) -o $@ $(LDFLAGS) $< -lc
|
2018-10-25 22:39:37 +03:00
|
|
|
|
|
|
|
false: false.o
|
2019-02-26 15:30:57 +03:00
|
|
|
$(LD) -o $@ $(LDFLAGS) $< -lc
|
2018-10-25 22:39:37 +03:00
|
|
|
|
2018-10-26 10:54:29 +03:00
|
|
|
hostname: hostname.o
|
2019-02-26 15:30:57 +03:00
|
|
|
$(LD) -o $@ $(LDFLAGS) $< -lc
|
2018-10-26 10:54:29 +03:00
|
|
|
|
2018-10-26 12:16:56 +03:00
|
|
|
cat: cat.o
|
2019-02-26 15:30:57 +03:00
|
|
|
$(LD) -o $@ $(LDFLAGS) $< -lc
|
2018-10-26 12:16:56 +03:00
|
|
|
|
2018-10-26 15:56:21 +03:00
|
|
|
uname: uname.o
|
2019-02-26 15:30:57 +03:00
|
|
|
$(LD) -o $@ $(LDFLAGS) $< -lc
|
2018-10-26 15:56:21 +03:00
|
|
|
|
2018-10-27 18:39:08 +03:00
|
|
|
clear: clear.o
|
2019-02-26 15:30:57 +03:00
|
|
|
$(LD) -o $@ $(LDFLAGS) $< -lc
|
2018-10-27 18:39:08 +03:00
|
|
|
|
2018-10-28 02:44:53 +03:00
|
|
|
tst: tst.o
|
2019-02-26 15:30:57 +03:00
|
|
|
$(LD) -o $@ $(LDFLAGS) $< -lc
|
2018-10-28 02:44:53 +03:00
|
|
|
|
2018-10-28 12:26:07 +03:00
|
|
|
mm: mm.o
|
2019-02-26 15:30:57 +03:00
|
|
|
$(LD) -o $@ $(LDFLAGS) $< -lc
|
2018-10-28 12:26:07 +03:00
|
|
|
|
2019-01-29 00:40:55 +03:00
|
|
|
dmesg: dmesg.o
|
2019-02-26 15:30:57 +03:00
|
|
|
$(LD) -o $@ $(LDFLAGS) $< -lc
|
2019-01-29 00:40:55 +03:00
|
|
|
|
2018-10-31 03:06:57 +03:00
|
|
|
kill: kill.o
|
2019-02-26 15:30:57 +03:00
|
|
|
$(LD) -o $@ $(LDFLAGS) $< -lc
|
2018-10-31 03:06:57 +03:00
|
|
|
|
2018-10-31 23:45:36 +03:00
|
|
|
tty: tty.o
|
2019-02-26 15:30:57 +03:00
|
|
|
$(LD) -o $@ $(LDFLAGS) $< -lc
|
2018-10-31 23:45:36 +03:00
|
|
|
|
2018-11-18 16:57:41 +03:00
|
|
|
mkdir: mkdir.o
|
2019-02-26 15:30:57 +03:00
|
|
|
$(LD) -o $@ $(LDFLAGS) $< -lc
|
2018-11-18 16:57:41 +03:00
|
|
|
|
2018-12-19 23:14:55 +03:00
|
|
|
touch: touch.o
|
2019-02-26 15:30:57 +03:00
|
|
|
$(LD) -o $@ $(LDFLAGS) $< -lc
|
2018-12-19 23:14:55 +03:00
|
|
|
|
2018-12-20 02:39:29 +03:00
|
|
|
sync: sync.o
|
2019-02-26 15:30:57 +03:00
|
|
|
$(LD) -o $@ $(LDFLAGS) $< -lc
|
2018-12-20 02:39:29 +03:00
|
|
|
|
2018-12-21 04:42:30 +03:00
|
|
|
more: more.o
|
2019-02-26 15:30:57 +03:00
|
|
|
$(LD) -o $@ $(LDFLAGS) $< -lc
|
2018-12-21 04:42:30 +03:00
|
|
|
|
2019-01-20 07:48:43 +03:00
|
|
|
guitest2: guitest2.o
|
2019-02-26 15:30:57 +03:00
|
|
|
$(LD) -o $@ $(LDFLAGS) -L../LibGUI $< -lgui -lc
|
2019-01-20 07:48:43 +03:00
|
|
|
|
2019-01-18 17:35:38 +03:00
|
|
|
sysctl: sysctl.o
|
2019-02-26 15:30:57 +03:00
|
|
|
$(LD) -o $@ $(LDFLAGS) $< -lc
|
2019-01-18 17:35:38 +03:00
|
|
|
|
2019-02-08 18:19:16 +03:00
|
|
|
pape: pape.o
|
2019-02-26 15:30:57 +03:00
|
|
|
$(LD) -o $@ $(LDFLAGS) $< -lc
|
2019-02-08 18:19:16 +03:00
|
|
|
|
2019-01-27 09:18:26 +03:00
|
|
|
cp: cp.o
|
2019-02-26 15:30:57 +03:00
|
|
|
$(LD) -o $@ $(LDFLAGS) $< -lc
|
2019-01-27 09:18:26 +03:00
|
|
|
|
2019-01-22 09:03:44 +03:00
|
|
|
rm: rm.o
|
2019-02-26 15:30:57 +03:00
|
|
|
$(LD) -o $@ $(LDFLAGS) $< -lc
|
2019-01-22 09:03:44 +03:00
|
|
|
|
2019-01-28 06:16:01 +03:00
|
|
|
rmdir: rmdir.o
|
2019-02-26 15:30:57 +03:00
|
|
|
$(LD) -o $@ $(LDFLAGS) $< -lc
|
2019-01-28 06:16:01 +03:00
|
|
|
|
2019-01-29 06:55:08 +03:00
|
|
|
chmod: chmod.o
|
2019-02-26 15:30:57 +03:00
|
|
|
$(LD) -o $@ $(LDFLAGS) $< -lc
|
2019-01-29 06:55:08 +03:00
|
|
|
|
2019-02-27 14:32:53 +03:00
|
|
|
chown: chown.o
|
|
|
|
$(LD) -o $@ $(LDFLAGS) $< -lc
|
|
|
|
|
2019-02-04 12:28:12 +03:00
|
|
|
top: top.o
|
2019-02-26 15:30:57 +03:00
|
|
|
$(LD) -o $@ $(LDFLAGS) $< -lc
|
2019-02-04 12:28:12 +03:00
|
|
|
|
2019-02-21 15:26:40 +03:00
|
|
|
ln: ln.o
|
2019-02-26 15:30:57 +03:00
|
|
|
$(LD) -o $@ $(LDFLAGS) $< -lc
|
2019-02-21 15:26:40 +03:00
|
|
|
|
2019-02-21 16:48:00 +03:00
|
|
|
df: df.o
|
2019-02-26 15:30:57 +03:00
|
|
|
$(LD) -o $@ $(LDFLAGS) $< -lc
|
2019-02-21 16:48:00 +03:00
|
|
|
|
2019-02-22 01:35:07 +03:00
|
|
|
su: su.o
|
2019-02-26 15:30:57 +03:00
|
|
|
$(LD) -o $@ $(LDFLAGS) $< -lc
|
2019-02-22 01:35:07 +03:00
|
|
|
|
2019-02-22 03:55:22 +03:00
|
|
|
env: env.o
|
2019-02-26 15:30:57 +03:00
|
|
|
$(LD) -o $@ $(LDFLAGS) $< -lc
|
2019-02-22 03:55:22 +03:00
|
|
|
|
2019-02-27 23:45:06 +03:00
|
|
|
stat: stat.o
|
|
|
|
$(LD) -o $@ $(LDFLAGS) $< -lc
|
|
|
|
|
2018-10-22 15:06:22 +03:00
|
|
|
.cpp.o:
|
|
|
|
@echo "CXX $<"; $(CXX) $(CXXFLAGS) -o $@ -c $<
|
|
|
|
|
2019-02-02 06:41:59 +03:00
|
|
|
-include $(OBJS:%.o=%.d)
|
|
|
|
|
2018-10-22 15:06:22 +03:00
|
|
|
clean:
|
2019-02-02 06:41:59 +03:00
|
|
|
@echo "CLEAN"; rm -f $(APPS) $(OBJS) *.d
|
2018-10-22 15:06:22 +03:00
|
|
|
|