-
Notifications
You must be signed in to change notification settings - Fork 14
/
makefile.local
78 lines (59 loc) · 2.5 KB
/
makefile.local
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
# -*- Makefile -*-
#
# rules that apply to the directory that this file belongs to
#
# Common Popeye source and generated files
# ========================================
INCLUDES = pylang.h
SRC_CFILES = pygmarr.c gengmarr.c
GENERATED_CFILES = pygmarr.c
ALLCFILES = $(SRC_CFILES) $(GENERATED_CFILES) DHT/*.c
DOCFILES= py-fran.txt py-deut.txt py-engl.txt \
readme.txt
SCRIPTS = $(wildcard scripts/*.sh)
SPECIALCFILES = pymain.c
HOSTFILES = \
pylang$(OBJ_SUFFIX) position/position-host$(OBJ_SUFFIX) \
position/board-host$(OBJ_SUFFIX) \
gengmarr$(EXE_SUFFIX)
include makefile.rules $(CURRPWD)/depend
DISTRIBUTEDFILES += $(SPECIALCFILES) $(DOCFILES)
# ===========================================================
# Target for compiling .c source files into object files
pyio: pyio.c pymac.h
$(CCTARGET) $(DEFINEMACRO)STANDALONE $(CFLAGS) \
$(EXEFILE)pyio pyio.c
pylang$(OBJ_SUFFIX): pylang.c
$(CCHOST) $(CFLAGS) $(COMPILEONLY) pylang.c $(OBJFILE)$@
# ===========================================================
# Target for generating the module that contains the game array
# position/position.c is compiled both for the host and the target.
# position/position-host$(OBJ_SUFFIX) is the object file for the host.
position/position-host$(OBJ_SUFFIX): position/position.c
$(CCHOST) $(CFLAGS) $(COMPILEONLY) -DAUXILIARY position/position.c $(OBJFILE)$@
# work around compilers that strictly derive object file name from
# source file name
@if [ 0 -eq $(OBJFILE_WORKS) ]; then \
mv position/position$(OBJ_SUFFIX) $@; \
fi
# position/board.c is compiled both for the host and the target.
# position/board-host$(OBJ_SUFFIX) is the object file for the host.
position/board-host$(OBJ_SUFFIX): position/board.c
$(CCHOST) $(CFLAGS) $(COMPILEONLY) -DAUXILIARY position/board.c $(OBJFILE)$@
# work around compilers that strictly derive object file name from
# source file name
@if [ 0 -eq $(OBJFILE_WORKS) ]; then \
mv position/board$(OBJ_SUFFIX) $@; \
fi
gengmarr$(OBJ_SUFFIX): gengmarr.c
$(CCHOST) $(CFLAGS) \
$(COMPILEONLY) -DAUXILIARY gengmarr.c $(OBJFILE)$@
gengmarr$(EXE_SUFFIX): gengmarr$(OBJ_SUFFIX) position/position-host$(OBJ_SUFFIX) position/board-host$(OBJ_SUFFIX)
$(LDHOST) $(EXEFILE)$@ $(LDFLAGS) $^
pygmarr.c: ./gengmarr$(EXE_SUFFIX)
$(EXECUTE) ./gengmarr$(EXE_SUFFIX) > $@
# ===========================================================
# Targets for applying code analsys tools
lint.out: $(ALLCFILES)
lint $(LINTFLAGS) $(CFLAGS) $(ALLCFILES) > lint.out
lint: lint.out