summaryrefslogtreecommitdiff
path: root/test/ldso/Makefile
blob: 06350ab912ab4d1206762f9f9d7e1204064423ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
TESTDIR=../
include $(TESTDIR)/Rules.mak

all: dltest libhowdy.so run

dltest.o: dltest.c
	$(CC) $(CFLAGS) -c dltest.c -o dltest.o

howdy.o: howdy.c
	$(CC) $(CFLAGS) -fPIC -c howdy.c -o howdy.o

libhowdy.so: howdy.o
	$(CC) $(CFLAGS) -shared -o libhowdy.so -Wl,-soname,libhowdy.so howdy.o

dltest: dltest.o
	$(CC) $(CFLAGS) -o dltest dltest.o -ldl
	
run: dltest libhowdy.so
	@echo Running dltest
	./dltest

clean:
	rm -f *.o *.so dltest core libhowdy.so