File: makefile

package info (click to toggle)
smlnj 110.79-8
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid
  • size: 82,564 kB
  • sloc: ansic: 32,532; asm: 6,314; sh: 2,296; makefile: 1,821; perl: 1,170; pascal: 295; yacc: 190; cs: 78; python: 77; lisp: 19
file content (94 lines) | stat: -rw-r--r-- 1,974 bytes parent folder | download | duplicates (5)
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
90
91
92
93
94
#
# the makefile for the C libraries
#
# Currently, this is only used to clean the library directories.
#

CC =		cc
CFLAGS =	-O
MAKE =		make
AR =		ar
ARFLAGS =	rcv
RANLIB =	ranlib

VERSION =	v-dummy

LIBS =		posix-os/libposix-os.a \
		smlnj-runtime/libsmlnj-runt.a \
		smlnj-signals/libsmlnj-sig.a \
		smlnj-prof/libsmlnj-prof.a \
		smlnj-sockets/libsmlnj-sock.a \
		smlnj-time/libsmlnj-time.a \
		smlnj-date/libsmlnj-date.a \
		smlnj-math/libsmlnj-math.a \
		smlnj-mp/libsmlnj-mp.a \
		posix-error/libposix-error.a \
		posix-filesys/libposix-filesys.a \
		posix-io/libposix-io.a \
		posix-procenv/libposix-procenv.a \
		posix-process/libposix-process.a \
		posix-signal/libposix-signal.a \
		posix-sysdb/libposix-sysdb.a \
		posix-sysdb/libposix-tty.a \
		smlnj-ccalls/libsmlnj-ccalls.a \
		dl/libunix-dynload.a

LIB_DIRS =	posix-os \
		smlnj-runtime \
		smlnj-signals \
		smlnj-sockets \
		smlnj-prof \
		smlnj-time \
		smlnj-date \
		smlnj-math \
		smlnj-mp \
		posix-error \
		posix-filesys \
		posix-io \
		posix-procenv \
		posix-process \
		posix-signal \
		posix-sysdb \
		posix-tty \
		smlnj-ccalls \
		dl


# include directories for this level
#
OBJS_DIR =	../objs
INC_DIR =	../include
INCLUDES =	-I$(OBJS_DIR) -I$(INC_DIR)

# include directories for the library sub-directories
#
LIB_OBJS_DIR =	../../objs
LIB_INC_DIR =	../../include
LIB_INCLUDES =	-I$(LIB_OBJS_DIR) -I$(LIB_INC_DIR) -I..

#
# arguments to recursive make
#
LIB_MK_ARGS =		VERSION="$(VERSION)" \
			MAKE="$(MAKE)" \
			CC="$(CC)" CFLAGS="$(CFLAGS)" DEFS="$(DEFS)" \
			AR="$(AR)" ARFLAGS="$(ARFLAGS)" \
			RANLIB="$(RANLIB)" \
			INCLUDES="$(LIB_INCLUDES)"

all:	$(VERSION)
	for dir in $(LIB_DIRS); do \
	  (cd $$dir; echo "building $$dir"; $(MAKE) $(LIB_MK_ARGS)) ; \
	done
	rm -rf libcfuns.a

$(VERSION):
	rm -f v-* *.o libcfuns.a
	echo "$(VERSION)" > $(VERSION)

clean :
	for dir in $(LIB_DIRS); do \
	  (cd $$dir; echo "cleaning $$dir"; $(MAKE) MAKE="$(MAKE)" clean) ; \
	done
	rm -f v-* *.o