-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathmakefile.all
84 lines (71 loc) · 2.25 KB
/
makefile.all
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
# Makefile - build rules
.PHONY: all demos examples docs
# Main objective: the whole project
all: addbanner examples demos
@echo Finished $(PROJECT).
@echo To create the documentation, run 'make docs'.
# Examples.
examples: $(EXMFILES)
@echo Finished all examples.
# Demonstration games.
demos: $(DEMFILES)
@echo Finished all demonstration games.
# Executables.
$(EXMBIN)%$(BINSUF): $(EXMSRC)%$(MAINSUF) $(LIBFILES)
fpc $(FLAGS) $(LIBPATHS) $(OUTPATHS) $< -o$@
@echo Example $@ ready!
$(FURIOUSPALADIN): $(FPSRC)furiouspaladin.pas $(FURIOUSUNITS) $(LIBFILES)
fpc $(FLAGS) $(LIBPATHS) $(OUTPATHS) $< -o$@
@echo Demonstration Game Furious Paladin ready!
$(PASCALROIDS): $(PASRC)pascalroids.pas $(PROIDSUNITS) $(LIBFILES)
fpc $(FLAGS) $(LIBPATHS) $(OUTPATHS) $< -o$@
@echo Demonstration Game Pascalroids ready!
# Documentation.
docs: $(LIBFILES) $(DOCFILES)
pasdoc $(DOCOPTS) $(DOCFMT) -E $(DOCDIR) -T "$(PROJECT)" -R $(DOCMAIN) --introduction $(DOCINTRO) $(LIBFILES)
# Returns some variables.
status: addbanner
@echo -----------------
@echo - Status Report -
@echo -----------------
@echo Project : $(PROJECT)
@echo Platform : $(PLATFORM)
@echo Compiler options : $(FLAGS) $(EFLAGS)
@echo Library units : $(LIBFILES)
@echo
@echo Examples : $(EXMFILES)
@echo
@echo Demo games : $(DEMFILES)
# Cleans everything.
veryclean: clean
$(DELETE) $(EXMBIN)ex_*
$(DELETE) $(DEMFILES)
$(DELETE) $(EXMBIN)*.dbg
$(DELETE) $(FPBIN)*.dbg
$(DELETE) $(PABIN)*.dbg
# Clean temporary files.
clean:
$(DELETE) $(OBJDIR)*.o
$(DELETE) $(OBJDIR)*.ppu
$(DELETE) $(OBJDIR)*.a
$(DELETE) $(OBJDIR)*.pduc
$(DELETE) $(OBJDIR)*.compiled
# Shows all options.
help: addbanner
@echo --------
@echo - Help -
@echo --------
@echo "make all } Builds the whole project."
@echo "make examples } Builds the examples only."
@echo "make demos } Builds the demonstration game only."
@echo "make docs } Builds internal documentation."
@echo "make clean } Deletes temporary files."
@echo "make veryclean } Deletes all generated files."
@echo "make status } Shows some configuration variables."
@echo "make help } Shows this help."
# Some info.
addbanner:
@echo $(PROJECT)
@echo "(c) Guillermo Martínez J. 2006-2024"
@echo https://allegro-pas.sourceforge.net
@echo