Differences

This shows you the differences between two versions of the page.

Link to this comparison view

x68000:skeleton_makefile_for_gcc_4.5.2_lydux [2017/10/23 16:00] (current)
neko68k created
Line 1: Line 1:
 +<​file>​
 +# 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)
 +</​file>​
 
 x68000/skeleton_makefile_for_gcc_4.5.2_lydux.txt ยท Last modified: 2017/10/23 16:00 by neko68k
 
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