This is an old revision of the document!


# The produced executable filename
TARGET	:= hns

CROSS_COMPILE = human68k-

AS = $(CROSS_COMPILE)as
LD = $(CROSS_COMPILE)ld
CC = $(CROSS_COMPILE)gcc
OBJCOPY = $(CROSS_COMPILE)objcopy

AFLAGS		:= -m68000 --register-prefix-optional
LDFLAGS		:= 
CFLAGS		:= -m68000 -std=c99 -fomit-frame-pointer
LDSCRIPT	:= 
LIBS		:= -ldos
OCFLAGS		:= -O xfile

ifneq ($(LDSCRIPT),)
LDFLAGS		+=  -T $(LDSCRIPT)
endif

XTARGET	:= $(TARGET).X

OBJS	:= main.o

%.o: %.S
	$(AS) $(AFLAGS) -o $@ $<
	
%.o: %.c
	$(CC) -c $(CFLAGS) $<

$(TARGET): $(OBJS) $(CRT0)
	
	$(CC) $(LDFLAGS) $(OBJS) $(LIBS) -o $@
	$(OBJCOPY) $(OCFLAGS) $@ bin/$(XTARGET)
	
all: $(TARGET)
	
clean:
	rm -f $(TARGET) bin/$(XTARGET) $(OBJS) $(CRT0)
 
 x68000/skeleton_makefile_for_gcc_4.5.2_lydux.1508734833.txt.gz · Last modified: 2019/08/27 20:44 (external edit)
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 4.0 International
Recent changes RSS feed Driven by DokuWiki