-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
83 lines (70 loc) · 1.77 KB
/
makefile
File metadata and controls
83 lines (70 loc) · 1.77 KB
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
# reldreds garbage nfo compile system
# Written by reldred, the artist formerly known as Aegir. Major kudos to Josef 'Patchman' Drexler for the
# suggestion to abuse the hell out of gcc preprocess and then make nforenum wipe our arses for us.
# Have fun.
# Our Steps:
# 1: gcc -ECP preprocess
# 2: nforenum process
# 3: grfcodec compile
# Macros:
# Paths for our tools
GRFCODEC = grfcodec
NFORENUM = nforenum -b +
GRFDIR = ../../../../Software/Games/JGR\ Patchpack/newgrf/
# GCC Settings:
CC = gcc
PREPROCESS = -nostdinc -E -C -P - <
# Aliases for the set:
NAME = re_nabs
# Now, the fun stuff:
# Target for all:
all : compile
# Compile GRF's
#don't need graphics anymore since grfcodec can eat pngs
#compile : process graphics
compile : process
# @echo "Compiling Windows GRF:"
# $(GRFCODEC) $(NAME)w.nfo .
# @echo
@echo "Compiling OpenTTD/DOS GRF:"
$(GRFCODEC) -em 1 $(NAME).nfo .
@echo
# NFORENUM process the Windows copy of the NFO
process : preprocess
@echo "NFORENUM Processing:"
-$(NFORENUM) $(NAME).nfo
# -cp $(NAME).nfo $(NAME)w.nfo
@echo
# GCC Preprocess the HNFO
preprocess :
@echo "GCC Preprocessing HNFO:"
$(CC) $(PREPROCESS) $(NAME).hnfo > $(NAME).nfo
@echo
# so grfcodec can handle pngs now...
#oh what wonders the new decade has wrought
#graphics :
# @echo "Converting .png files to .pcx:"
# $(MAKE) -C art/
# @echo
# Clean the source tree
clean:
@echo "Cleaning source tree:"
@echo "Remove backups:"
-rm *.bak *~
# @echo
# @echo "Remove .pcx:"
# -rm art/*.pcx
@echo
@echo "Remove .nfo:"
-rm *.nfo
@echo
@echo "Remove compiled .grf:"
-rm *.grf
# Installation process
install:
@echo Installing .grf files to $(GRFDIR).
# @echo "Windows GRF:"
# -cp $(NAME)w.grf $(GRFDIR)/$(NAME)w.grf
# @echo
@echo "DOS/OpenTTD GRF:"
-cp $(NAME).grf $(GRFDIR)/$(NAME).grf