aboutsummaryrefslogtreecommitdiffstats
path: root/elf/Makefile
blob: 0cab8eabc274d6d81af543524baed18a2b1826d7 (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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
## License would go here

########
# Tools

CC = gcc

RM = rm -f

################
# Build options

CFLAGS = -Wall -DELF_USERSPACE_TEST

LDFLAGS = 

##################
# Generated files

# Test executable name
TESTPROG = elftest

# Test module name
TESTMODULE = hello.so

###############
# Make targets
.PHONY: all test-prog test-module clean

all: test-prog test-module 


# The testing user-space application
test-prog: $(TESTPROG)

$(TESTPROG): elftest.o elf_module.o
	$(CC) -o $@ $^

	
# The shared module to test on
test-module: $(TESTMODULE)

$(TESTMODULE): hello.o
	$(CC) -shared -o $@ $^


# Cleanup target
clean:
	-$(RM) *.o
	-$(RM) $(TESTPROG)
	-$(RM) $(TESTMODULE)