summaryrefslogtreecommitdiff
path: root/ELFLoader/Makefile
blob: 1b868acee5ca764e2dda69be90510cd050b4f20d (plain)
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
PROGRAM = run

AK_OBJS = \
    ../AK/String.o \
    ../AK/StringImpl.o \
    ../AK/MappedFile.o \
    ../AK/TemporaryFile.o \
    ../AK/kmalloc.o

CSILLA_OBJS = \
    ExecSpace.o \
    ELFImage.o \
    ELFLoader.o \
    test.o

TEST_OBJ = \
    _test.o

TEST_OBJ_CXXFLAGS = -Os -fno-exceptions -fno-rtti -fno-asynchronous-unwind-tables

OBJS = $(AK_OBJS) $(CSILLA_OBJS)

CXXFLAGS = -std=c++17 -Os -W -Wall -I. -I.. -ggdb3

all:	$(PROGRAM) $(TEST_OBJ)

_test.o: _test.cpp
	$(CXX) $(TEST_OBJ_CXXFLAGS) -c $<

.cpp.o:
	$(CXX) $(CXXFLAGS) -o $@ -c $<

clean:
	rm -f $(OBJS) $(TEST_OBJ) $(PROGRAM)

$(PROGRAM): $(OBJS)
	$(CXX) $(LDFLAGS) -o $@ $(OBJS)