aboutsummaryrefslogtreecommitdiff
path: root/01_dynamic_linking/Makefile
blob: 50aa0c36c7f9becc011fa28ad5936597b4379aa6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# Copyright (c) 2020 Johannes Stoelp

inspect: build
	readelf -W --sections main
	readelf -W --dynamic main
	readelf -W --program-headers main
	readelf -W --string-dump .interp main
	gdb -q --batch -ex 'starti' -ex 'bt' ./main

build: libgreet.c main.c
	gcc -o libgreet.so libgreet.c -shared -fPIC
	gcc -o main main.c -lgreet -L. -Wl,--rpath=$(PWD)

clean:
	rm -f libgreet.so main