File: Makefile

package info (click to toggle)
eztrace 2.0%2Brepack-12
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 4,132 kB
  • sloc: ansic: 23,501; perl: 910; sh: 857; cpp: 771; makefile: 696; fortran: 327; f90: 320; python: 57
file content (28 lines) | stat: -rw-r--r-- 716 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Copyright (C) CNRS, INRIA, Université Bordeaux 1, Télécom SudParis
# See COPYING in top-level directory.

BIN = libexample.so libstatic_example.a main main_mpi

all: $(BIN)

main_mpi: main.c example.h
	mpicc -o main_mpi main.c -L. -lexample -lstatic_example

main: main.c example.h libexample.so libstatic_example.a
	$(CC) -o main main.c -L. -lexample -lstatic_example -O0 -g

libexample.so: example.o
	$(CC) --shared -o libexample.so example.o -ldl

libstatic_example.a: static_example.o
	ar rcs libstatic_example.a static_example.o

static_example.o: static_example.c
	$(CC) -c static_example.c  -O0 -g

example.o: example.c example.h
	$(CC) -o example.o -c example.c -fPIC  -O0 -g


clean:
	rm -f $(BIN) *.o