blob: 3d7ca6bebedcc9bcbca79bcd42ce8ddc3d94e638 (
plain) (
blame)
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
|
.PHONY: clean, mrproper
CXX = i586-elf-g++
CXXFLAGS = -nostartfiles -nostdlib -ffreestanding -fno-exceptions -fno-rtti -I ../../Library/Common -I ../../Library/Interface -I ../../Library/Userland -D THIS_IS_MELON_USERLAND
LD = i586-elf-ld
LDFLAGS = -T ../../Library/App.ld -L ../../Library
Objects = Shell.class.o
OutFile = Shell
Applets = Applets/cat Applets/halt Applets/reboot Applets/uptime Applets/free Applets/ls \
Applets/pwd Applets/rm Applets/mkdir
all: $(OutFile) $(Applets)
echo "* Done with $(OutFile)."
rebuild: mrproper all
$(OutFile): $(Objects)
echo "* Linking $@..."
$(LD) $(LDFLAGS) $^ -o $@
Applets/%: Applets/%.o
echo "* Linking $@..."
$(LD) $(LDFLAGS) $^ -o $@ -Map $@.map
%.o: %.cpp
echo "* Compiling $<..."
$(CXX) $(CXXFLAGS) -c $< -o $@
clean:
echo "* Removing object files..."
rm -rf *.o Applets/*.o
mrproper: clean
echo "* Removing applications..."
rm -rf $(OutFile) $(Applets)
|