forked from mvslovers/mvsclib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
62 lines (49 loc) · 1.63 KB
/
Makefile
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
# Makefile for MVS
USER ?= HERC01
PASS ?= CUL8TR
# --------------------------------------------
# System dependent
# --------------------------------------------
CC=gcc
GCCMVS ?= ../gccmvs/gccmvs
RDRPREP ?= ../playmvs/rdrprep/rdrprep
HERCHOST ?= 127.0.0.1
HERCPORT ?= 3505
all: linux/libmvsclib.a mvs_asm
# --------------------------------------------
# Linux
# --------------------------------------------
LINUX_C_OPTS=-c -O2 -fno-builtin -fno-stack-protector -m32 -DUSE_MEMMGR -I common/include
LINUX_C_SOURCE:=$(wildcard ./common/src/*.c )
LINUX_OBJ:=$(subst .c,.o,$(LINUX_C_SOURCE) )
.c.o:
$(CC) $(LINUX_C_OPTS) $< -o $@
linux/asm/linsupa.o: linux/asm/linsupa.asm
as --32 -o $@ $<
linux/libmvsclib.a: $(LINUX_OBJ) linux/asm/linsupa.o
ar r linux/libmvsclib.a $(LINUX_OBJ) linux/asm/linsupa.o
# --------------------------------------------
# MVS
# --------------------------------------------
MVS_INCLUDES = -I common/include -I mvs/include
MVS_OPTS = -S -Os -DXXX_MEMMGR $(MVS_INCLUDES)
MVS_C_SOURCE:=$(wildcard ./common/src/*.c)
MVS_C_SOURCE+=$(wildcard ./mvs/src/ezasmi/*.c)
MVS_C_SOURCE+=$(wildcard ./mvs/src/fss/*.c)
MVS_S:=$(subst .c,.s,$(MVS_C_SOURCE))
mvs_asm: $(MVS_S)
m4 -D__USER__=$(USER) -D__PASS__=$(PASS) \
-I mvs/maclib/ -I mvs/asm/ -I common/src/ \
job_mvs_template.m4 > job_mvs.jcl
.c.s:
$(GCCMVS) $(MVS_OPTS) $< -o $@
send_ascii:
nc -w1 $(HERCHOST) $(HERCPORT) < job_mvs.jcl
send_ebcdic:
$(RDRPREP) job_mvs.jcl tmp.jcl_E
nc -w1 $(HERCHOST) $(HERCPORT) < tmp.jcl_E
clean:
@rm -f common/src/*.o common/src/*.s \
linux/asm/linsupa.o linux/libmvsclib.a \
mvs/src/ezasmi/*.s mvs/src/fss/*.s \
job_mvs.jcl