Sharedwww / onhand / Factor / makefileOpen in CoCalc
Author: William A. Stein
1
#==========================================================================
2
# Project Name:RUPUTER
3
# Copyright (c) Seiko Instruments Inc. 1998-1999. All rights reserved.
4
#==========================================================================
5
6
CYGFS = d:/onHand_SDK/mec-980228/H-i386-cygwin32
7
RUPSDK = d:/onHand_SDK/RupSDK
8
9
TARGET = factor
10
OBJS = startup.o main.o
11
12
13
CC = gcc
14
AS = as
15
LD = ld
16
RANLIB = ranlib
17
OBJCOPY = mn10200-elf-objcopy
18
SF2BIN = sf2bin
19
20
21
CFLAGS = -g -c -O1
22
CPPFLAGS = -I$(RUPSDK)/Inc
23
ASFLAGS = -I$(RUPSDK)/Inc
24
LDFLAGS = -Ttext 0x110100 -Map $(TARGET).map
25
#LIBRUP = -L$(RUPSDK)/Lib -lrupmenu -lruptool -lrupsys -llcdbios -lpsdos -lwbios
26
LIBRUP = -L$(RUPSDK)/Lib -lrupsys -lpsdos -llcdbios
27
LIBSTD = -L$(CYGFS)/mn10200-elf/lib -lm -lc
28
LIBGCC = -L$(CYGFS)/lib/gcc-lib/mn10200-elf/2.7-mec980228 -lgcc
29
30
31
$(TARGET).exf : $(TARGET).elf
32
$(OBJCOPY) -O srec $(TARGET).elf
33
$(SF2BIN) $(TARGET).elf $(TARGET).exf
34
35
$(TARGET).elf : $(OBJS)
36
$(LD) $(LDFLAGS) -o $(TARGET).elf $(OBJS) $(LIBRUP) $(LIBSTD) $(LIBGCC)
37
38
39
startup.o: startup.s
40
$(AS) $(ASFLAGS) startup.s -o startup.o
41
42
.SUFFIX: .c
43
.c.o:
44
$(CC) $(CFLAGS) $(CPPFLAGS) $<
45