summaryrefslogtreecommitdiff
path: root/test/ldso/Makefile
blob: ac33e8e274962eac97158ed150e1adabeaf66f03 (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) -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