Blame view

Network/libnet/makefile 1.76 KB
fee2cbd6   amoreau   ajout des librairies
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
  BASE = .
  
  ifeq ($(wildcard port.mak),)
  error:
  	@echo You have not made a port.mak file!  See the installation instructions in
  	@echo the readme.txt file for details.
  endif
  
  -include $(BASE)/port.mak
  
  .PHONY: all lib install tests examples clean cleaner veryclean rebuild reinstall dist
  
  
  -include testdirs.mak
  
  
  all: lib tests examples
  
  
  lib:
  	$(MAKE) -C lib/ lib
  install:
  	$(MAKE) -C lib/ install
  
  tests:
  	$(MAKE) -C tests/
  examples:
  	$(MAKE) -C examples/
  
  clean:
  	$(MAKE) -C lib/ clean
  	$(MAKE) -C tests/ clean
  	$(MAKE) -C examples/ clean
  cleaner:
  	$(MAKE) -C lib/ cleaner
  	$(MAKE) -C tests/ cleaner
  	$(MAKE) -C examples/ cleaner
  veryclean:
  	$(MAKE) -C lib/ veryclean
  	$(MAKE) -C tests/ veryclean
  	$(MAKE) -C examples/ veryclean
  
  distclean: cleaner
  	$(MAKE) -C docs/
  	-rm -f port.mak
  	-rm -f make.bat
  	-rm -f batfiles/make*.bat
  
  
  rebuild: veryclean all
  reinstall:
  	$(MAKE) -C lib/ reinstall
  
  
  # What follows is a bit crap.  It requires write permission in the parent
  # directory and requires that this directory is called `libnet'.
  
  ifneq ($(DJGPP),)
  
  dist: distclean
  	@echo "Creating ZIP distribution..."
  	cd .. ; pkzip -ex -rP libnet.zip libnet/*.*
  
  else
  
  .PHONY: bats utod dtou dosdist unixdist
  
  bats:
  	cd batfiles ; . gen.sh
  
  utod:
  	@echo "Converting files to DOS format..."
  	@find . -name CVS -prune -o -type f -! -name makefile\* -! -name \*.mak -exec utod {} \;
  
  dtou:
  	@echo "Converting files to Unix format..."
  	@find . -name CVS -prune -o -type f -exec dtou {} \;
  
  dosdist: distclean bats utod
  	@echo -e "Creating ZIP distribution..."
  	@(cd .. && find libnet -name CVS -prune -o -print | zip libnet.zip -@ )
  
  unixdist: distclean dtou
  	@echo -e "Creating tarball distribution..."
  	@(cd .. && tar -cf libnet.tar libnet --exclude CVS && gzip -f libnet.tar )
  
  dist: dosdist unixdist
  
  endif