0
|
1 # Makefile
|
|
2
|
|
3 include ../make/make.config
|
|
4
|
|
5 all: cast-pv$(EXE) cast-hart$(EXE) cast-sub$(EXE) test-pv$(EXE) test-hart$(EXE) test-sub$(EXE)
|
|
6
|
|
7 .SUFFIXES: .c .o
|
|
8
|
|
9 .c$(O):
|
|
10 $(CC) $(CFLAGS) $(INCLUDES) -o $@ -c $<
|
|
11
|
|
12 cast-pv$(EXE): cast-pv$(O) common$(O)
|
|
13 $(CC) $(LDFLAGS) -o $@ cast-pv$(O) common$(O) $(PGMLIBS)
|
|
14
|
|
15 cast-hart$(EXE): cast-hart$(O) common$(O)
|
|
16 $(CC) $(LDFLAGS) -o $@ cast-hart$(O) common$(O) $(PGMLIBS)
|
|
17
|
|
18 cast-sub$(EXE): cast-sub$(O) common$(O)
|
|
19 $(CC) $(LDFLAGS) -o $@ cast-sub$(O) common$(O) $(PGMLIBS)
|
|
20
|
|
21 test-pv$(EXE): test-pv$(O) common$(O)
|
|
22 $(CC) $(LDFLAGS) -o $@ test-pv$(O) common$(O) $(PGMLIBS)
|
|
23
|
|
24 test-hart$(EXE): test-hart$(O) common$(O)
|
|
25 $(CC) $(LDFLAGS) -o $@ test-hart$(O) common$(O) $(PGMLIBS)
|
|
26
|
|
27 test-sub$(EXE): test-sub$(O) common$(O)
|
|
28 $(CC) $(LDFLAGS) -o $@ test-sub$(O) common$(O) $(PGMLIBS)
|
|
29
|
|
30 test: cast-pv$(EXE) cast-hart$(EXE) cast-sub$(EXE) test-pv$(EXE) test-hart$(EXE) test-sub$(EXE)
|
|
31 cast-pv < ../images/lena.pgm > ../watermarked/foto-pv_lena.pgm
|
|
32 cast-hart < ../images/lena.pgm > ../watermarked/foto-hart_lena.pgm
|
|
33 cast-sub < ../images/lena.pgm > ../watermarked/foto-sub_lena.pgm
|
|
34
|
|
35 test-pv < ../watermarked/foto-pv_lena.pgm > ../wms/foto-pv.wm
|
|
36 test-hart < ../watermarked/foto-hart_lena.pgm > ../wms/foto-hart.wm
|
|
37 test-sub < ../watermarked/foto-sub_lena.pgm > ../wms/foto-sub.wm
|
|
38
|
|
39 install: cast-pv$(EXE) cast-hart$(EXE) cast-sub$(EXE) test-pv$(EXE) test-hart$(EXE) test-sub$(EXE)
|
|
40 $(CP) cast-pv$(EXE) cast-hart$(EXE) cast-sub$(EXE) test-pv$(EXE) test-hart$(EXE) test-sub$(EXE) $(INSTALLDIR)
|
|
41
|
|
42 clean:
|
|
43 $(RM) *$(O) cast-pv$(EXE) cast-hart$(EXE) cast-sub$(EXE) test-pv$(EXE) test-hart$(EXE) test-sub$(EXE)
|
|
44 $(RM) ../watermarked/* ../wms/*
|