home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
M.u.C.S. Disc 2000
/
MUCS2000.iso
/
gnuc
/
util-41s.lzh
/
util-41
/
Makefile.cross
< prev
next >
Wrap
Makefile
|
1998-10-06
|
2KB
|
106 lines
#
# Makefile for utils for Atari Cross Compilers
#
# - adjust CROSSDIR below for your setup
# - define CC to be the path to your hosts C compiler (gcc preferred except on
# sparc on the sparc cc is the preferred host C compiler).
# - If you are going to run the cross linker on a machine that aligns
# structures at longword boundaries (machines such as Sun-Sparc, Ix86)
# add -DWORD_ALIGNED to MACHINE
# - If you are going to run the cross linker on a machine that has the opposite
# byte sex to a m68k, ie a little endian host like Ix86, then add
# -DBYTE_SWAP to MACHINE.
#
MAKE = make
# cross gcc
CROSSDIR = /usr/local/m68k-atari-mint
CROSSBIN = $(CROSSDIR)/bin
CROSSLIB = $(CROSSDIR)/lib
CROSSINC = $(CROSSDIR)/include
# host gcc
CC=/usr/bin/gcc
# host include dir
HOSTINC = /usr/include
# host specific flags
MACHINE = -DBYTE_SWAP -DWORD_ALIGNED
CFLAGS = -O2 -I. -I$(HOSTINC) -DCROSSATARI=1 \
-DCROSSDIR=\"$(CROSSDIR)\" -DCROSSLIB=\"$(CROSSLIB)\" \
$(MACHINE)
PROGS = ar cnm fixstk ld nm printstk size size68 strings strip sym-ld toglclr
all: $(PROGS)
SRCS = ar.c cnm.c cplusdem.c fixstk.c ld.c nm.c printstk.c size.c size68.c \
strings.c strip.c sym-ld.c toglclr.c version.c
AR_OBJS = ar.o version.o
CNM_OBJS = cnm.o version.o
FIX_OBJS = fixstk.o version.o
LD_OBJS = ld.o cplusdem.o version.o
NM_OBJS = nm.o cplusdem.o version.o
PRT_OBJS = printstk.o version.o
SIZ_OBJS = size.o version.o
S68_OBJS = size68.o version.o
STP_OBJS = strip.o version.o
STR_OBJS = strings.o version.o
SLD_OBJS = sym-ld.o cplusdem.o version.o
TGL_OBJS = toglclr.o version.o
%.o: %c
$(CC) $(CFLAGS) -c $< -o $@
version.o: PatchLev.h
ar : $(AR_OBJS)
$(CC) -o $@ $(AR_OBJS)
cnm: $(CNM_OBJS)
$(CC) -o $@ $(CNM_OBJS)
fixstk: $(FIX_OBJS)
$(CC) -o $@ $(FIX_OBJS)
ld : $(LD_OBJS)
$(CC) -o $@ $(LD_OBJS)
nm : $(NM_OBJS)
$(CC) -o $@ $(NM_OBJS)
printstk: $(PRT_OBJS)
$(CC) -o $@ $(PRT_OBJS)
size: $(SIZ_OBJS)
$(CC) -o $@ $(SIZ_OBJS)
size68: $(S68_OBJS)
$(CC) -o $@ $(S68_OBJS)
strings: $(STR_OBJS)
$(CC) -o $@ $(STR_OBJS)
strip: $(STP_OBJS)
$(CC) -o $@ $(STP_OBJS)
sym-ld : $(SLD_OBJS)
$(CC) -o $@ $(SLD_OBJS)
toglclr: $(TGL_OBJS)
$(CC) -o $@ $(TGL_OBJS)
install: $(PROGS)
cp $(PROGS) $(CROSSBIN)
clean:
rm -f *.o
distclean: clean
rm -f $(PROGS) core report