File: makefile.in

package info (click to toggle)
picosat 936-4
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 464 kB
  • sloc: ansic: 13,779; sh: 160; makefile: 139
file content (54 lines) | stat: -rw-r--r-- 1,183 bytes parent folder | download
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
CC=@CC@
CFLAGS=@CFLAGS@

all: @TARGETS@

clean:
	rm -f picosat *.exe *.s *.o *.a *.so.1.0.0
	rm -f makefile config.h
	rm -f gmon.out *~
	rm -f picomus

picosat: libpicosat.a app.o main.o
	$(CC) $(CFLAGS) -o $@ main.o app.o -L. -lpicosat

picomus: libpicosat.a picomus.o
	$(CC) $(CFLAGS) -o $@ picomus.o -L. -lpicosat

app.o: app.c picosat.h makefile
	$(CC) $(CFLAGS) -c $<

picomus.o: picomus.c picosat.h makefile
	$(CC) $(CFLAGS) -c $<

main.o: main.c picosat.h makefile
	$(CC) $(CFLAGS) -c $<

picosat.o: picosat.c picosat.h makefile
	$(CC) $(CFLAGS) -c $<

version.o: version.c config.h makefile
	$(CC) $(CFLAGS) -c $<

config.h: makefile VERSION mkconfig # and actually picosat.c
	rm -f $@; ./mkconfig > $@

libpicosat.a: picosat.o version.o
	ar rc $@ picosat.o version.o
	ranlib $@

%.pic.o: %.o
	mv $< $*.nopic.o
	$(MAKE) CFLAGS="$(CFLAGS) -fPIC" $<
	mv $< $@
	mv $*.nopic.o $<

libpicosat.so: picosat.pic.o version.pic.o
	$(CC) $(CFLAGS) -shared -Wl,-soname,libpicosat.so.1 -o \
		libpicosat.so.1.0.0 $^ -lc

libpicosat-trace.so: picosat.pic.o version.pic.o
	$(CC) $(CFLAGS) -shared -Wl,-soname,libpicosat-trace.so.1 -o \
		libpicosat-trace.so.1.0.0 $^ -lc

.PHONY: all clean