diff options
author | johannst <johannes.stoelp@gmail.com> | 2021-04-21 23:44:16 +0200 |
---|---|---|
committer | johannst <johannes.stoelp@gmail.com> | 2021-04-21 23:44:16 +0200 |
commit | e6716313137bc397d7d7d42faf07b06a5fea65c1 (patch) | |
tree | b4994545128403db6c8a16c45ebf488ee4d3f8ec /04_dynld_nostd/Makefile | |
parent | 85230524414b6d27664bf77c8584bfeced6c71cb (diff) | |
download | dynld-e6716313137bc397d7d7d42faf07b06a5fea65c1.tar.gz dynld-e6716313137bc397d7d7d42faf07b06a5fea65c1.zip |
own make target for libgreet.so
Diffstat (limited to '04_dynld_nostd/Makefile')
-rw-r--r-- | 04_dynld_nostd/Makefile | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/04_dynld_nostd/Makefile b/04_dynld_nostd/Makefile index c1a472a..e72dde8 100644 --- a/04_dynld_nostd/Makefile +++ b/04_dynld_nostd/Makefile @@ -7,15 +7,7 @@ COMMON_CFLAGS := -g -O0 -Wall -Wextra \ run: main ./$< -main: dynld.so main.c ../lib/libcommon.a - @# For now ew only add support for ELF hash tables (DT_HASH). - @# Therefore we specify the `hash-style` below. - gcc -o libgreet.so \ - $(COMMON_CFLAGS) \ - -fPIC -shared \ - -Wl,--hash-style=sysv \ - libgreet.c - +main: dynld.so libgreet.so main.c ../lib/libcommon.a @# For now ew only add support for ELF hash tables (DT_HASH). @# Therefore we specify the `hash-style` below. gcc -o $@ \ @@ -31,6 +23,15 @@ main: dynld.so main.c ../lib/libcommon.a objdump --disassemble -j .plt -M intel $@ objdump --disassemble=_start -M intel $@ +libgreet.so: libgreet.c + @# For now ew only add support for ELF hash tables (DT_HASH). + @# Therefore we specify the `hash-style` below. + gcc -o $@ \ + $(COMMON_CFLAGS) \ + -fPIC -shared \ + -Wl,--hash-style=sysv \ + $^ + dynld.so: dynld.S dynld.c ../lib/libcommon.a gcc -o $@ \ $(COMMON_CFLAGS) \ |