File: Fpiccompile

package info (click to toggle)
vmatch 2.3.1%2Bdfsg-8
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 17,108 kB
  • sloc: ansic: 70,897; sh: 7,139; perl: 4,152; makefile: 1,169; xml: 642; awk: 563; ruby: 306; haskell: 288; sed: 60
file content (11 lines) | stat: -rw-r--r-- 307 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
This example shows how to compile a shared object from more than
one C-file:

mycode.o:
        gcc ${CFLAGS} ${CPPFLAGS} -fPIC -c mycode.c

selstartend.o:
        gcc ${CFLAGS} ${CPPFLAGS} -fPIC -c selstartend.c

selstartend.so:selstartend.o mycode.o
        ld -G -o selstartend.so selstartend.o mycode.o