summaryrefslogtreecommitdiff
path: root/Source/Library/Makefile
blob: f7d337bdf847455dd850fc752f9c8e9bc44c13b7 (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
.PHONY: clean, mrproper

CXX = g++
CXXFLAGS = -nostartfiles -nostdlib -fno-exceptions -fno-rtti -I Common -I Userland -D THIS_IS_MELON_USERLAND

LDFLAGS = -r
LD = ld

Library = Melon.o
Objects = Common/WChar.class.uo \
		  Common/CMem.ns.uo \
		  Userland/Syscall/Syscall.wtf.uo

all: $(Library)
	echo "* Done with library"

rebuild: mrproper all

$(Library): $(Objects)
	echo "* Linking melon library $(Library)..."
	$(LD) $(LDFLAGS) $^ -o $@

%.uo: %.cpp
	echo "* Compiling $<..."
	$(CXX) $(CXXFLAGS) -c $< -o $@

clean:
	echo "* Removing object files..."
	rm -rf $(Objects)

mrproper: clean
	echo "* Removing library..."
	rm -rf $(Library)