-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile.wat
77 lines (59 loc) · 1.49 KB
/
Makefile.wat
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
SYSTYPE = WINNT
CC = wcc386
SRCS= store.c pack.c compress.c crc.c &
io.c error.c misc.c date.c arcfs.c garble.c
HDRS= store.h pack.h compress.h crc.h &
nsparkio.h error.h misc.h date.h os.h spark.h arcfs.h garble.h version.h
NSPARKSRCS = main.c arc.c unarc.c
NSPARKHDRS = main.h arc.h unarc.h
SQSHSRCS = sqshmain.c unarc.c
SQSHHDRS = unarc.h
EXE = .exe
OBJ = .obj
!ifeq SYSTYPE WINNT
CFLAGS += -bt=nt
OS_SRCS = winnt.c
system = nt
!endif
!ifeq SYSTYPE MSDOS
CFLAGS += -D__MSDOS__ -bt=dos -mc
OS_SRCS = msdos.c
system = dos
CC=wcc
!endif
!ifeq SYSTYPE MSDOS32
CFLAGS += -D__MSDOS__ -bt=dos
OS_SRCS = msdos.c
system = dos4g
!endif
OBJS = $(SRCS:.c=$(OBJ))
NSPARKOBJS = $(NSPARKSRCS:.c=$(OBJ))
SQSHOBJS = $(SQSHSRCS:.c=$(OBJ))
OS_OBJS = $(OS_SRCS:.c=$(OBJ))
CFLAGS += -zq -oaxt -d0 -wx -fo=$(OBJ) -D$(SYSTYPE)
all: nspark$(EXE) sqsh$(EXE)
nspark$(EXE) : nspark.lnk
wlink @$?
sqsh$(EXE) : sqsh.lnk
wlink @$?
nspark.lnk : $(OBJS) $(OS_OBJS) $(NSPARKOBJS)
%create $@
@%append $@ debug all
@%append $@ name $*
@%append $@ op map, quiet
@%append $@ system $(system)
@for %i in ($?) do @%append $@ file %i
sqsh.lnk : $(OBJS) $(OS_OBJS) $(SQSHOBJS)
%create sqsh.lnk
@%append $@ debug all
@%append $@ name $*
@%append $@ op map, quiet
@%append $@ system $(system)
@for %i in ($?) do @%append $@ file %i
.EXTENSIONS:
.EXTENSIONS: $(EXE) $(OBJ) .c .h
.c:$(CDIR)
.c$(OBJ) :
$(CC) $(CFLAGS) $[*
clean: .symbolic
rm -f *$(EXE) *$(OBJ) *.err *.lnk *.exp *.map