File: makefile

package info (click to toggle)
stalin 0.8-6
  • links: PTS
  • area: main
  • in suites: potato
  • size: 28,288 kB
  • ctags: 60,398
  • sloc: ansic: 804,080; lisp: 41,578; sh: 772; makefile: 97; sed: 59
file content (46 lines) | stat: -rw-r--r-- 1,564 bytes parent folder | download
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
# Stalin can be compiled with egcs when it is available.
#CC = egcs
CC = gcc

OPTIONS = -I ./include -On -du -dI -t -c -db\
          -clone-size-limit 0 -split-even-if-no-widening\
          -do-not-align-strings\
          -treat-all-symbols-as-external\
          -do-not-index-constant-structure-types-by-expression\
          -do-not-index-allocated-structure-types-by-expression

# Stalin can be compiled with -freg-struct-return on most platforms. But gcc
# and egcs have a bug on Linux/Alpha that causes them the crash when given
# -freg-struct-return so the default is not to use -freg-struct-return so that
# the same makefile will work on all platforms. If you are not running on
# Linux/Alpha then it is recommended to enable -freg-struct-return.
#stalin: stalin.c
#	$(CC) -o stalin -I./include -O2 -fomit-frame-pointer\
#	      -freg-struct-return stalin.c -L./include -lm -lgc
# Setting this up appropriately should be handled in ./build via ARCH_OPTS.

stalin: stalin.c
	$(CC) -o stalin -I./include -O2 -fomit-frame-pointer ${ARCH_OPTS} \
	      stalin.c -L./include -lm -lgc
	./post-make

stalin.c: stalin.sc
	./stalin $(OPTIONS) stalin

stalin-32.c: stalin.sc
	./stalin $(OPTIONS) -b32 stalin
	cp -f stalin.c stalin-32.c

stalin-alpha.c: stalin.sc
	./stalin $(OPTIONS) -b64 stalin
	cp -f stalin.c stalin-alpha.c

# Should ./stalin ./include/stalin and ./stalin.c only be deleted in a
# "distclean" target?
clean:
	rm -f ./include/gc.h
	rm -f ./include/libgc.a
	rm -f ./include/libstalin.a
	rm -f ./include/stalin
	rm -f ./stalin.c
	rm -f ./stalin