mirror of
https://github.com/cc65/cc65.git
synced 2025-01-10 19:29:45 +00:00
Samples updates
This commit is contained in:
parent
88ee45e9ef
commit
a3fce656b7
@ -8,10 +8,6 @@
|
|||||||
# var. to build for another target system.
|
# var. to build for another target system.
|
||||||
SYS ?= c64
|
SYS ?= c64
|
||||||
|
|
||||||
# New targets can define MACHINE separately
|
|
||||||
# from target if needed.
|
|
||||||
MACHINE=$(SYS)
|
|
||||||
|
|
||||||
# Just the usual way to define a variable
|
# Just the usual way to define a variable
|
||||||
# containing a single space character.
|
# containing a single space character.
|
||||||
SPACE :=
|
SPACE :=
|
||||||
@ -139,21 +135,19 @@ LDFLAGS_tgidemo_atarixl = --start-addr 0x4000
|
|||||||
%: %.s
|
%: %.s
|
||||||
|
|
||||||
.c.o:
|
.c.o:
|
||||||
$(CC) $(CFLAGS) -Ors --codesize 500 -T -g -t $(MACHINE) $<
|
$(CC) $(CFLAGS) -Ors --codesize 500 -T -g -t $(SYS) $<
|
||||||
$(AS) $(<:.c=.s)
|
$(AS) $(<:.c=.s)
|
||||||
|
|
||||||
.s.o:
|
.s.o:
|
||||||
$(AS) $(ASFLAGS) -t $(MACHINE) $<
|
$(AS) $(ASFLAGS) -t $(SYS) $<
|
||||||
|
|
||||||
.PRECIOUS: %.o
|
.PRECIOUS: %.o
|
||||||
|
|
||||||
.o:
|
.o:
|
||||||
ifeq ($(SYS),vic20)
|
ifeq ($(SYS),vic20)
|
||||||
$(LD) $(LDFLAGS_$(@F)_$(SYS)) $(LDFLAGS) -o $@ -C vic20-32k.cfg -m $@.map $^ $(SYS).lib
|
$(LD) $(LDFLAGS_$(@F)_$(SYS)) $(LDFLAGS) -o $@ -C vic20-32k.cfg -m $@.map $^ $(SYS).lib
|
||||||
else ifeq ($(SYS),sym1)
|
|
||||||
$(LD) $(LDFLAGS_$(@F)_$(SYS)) $(LDFLAGS) -o $@.bin -C sym1.cfg -m $@.map $^ $(SYS).lib
|
|
||||||
else
|
else
|
||||||
$(LD) $(LDFLAGS_$(@F)_$(SYS)) $(LDFLAGS) -o $@ -t $(MACHINE) -m $@.map $^ $(SYS).lib
|
$(LD) $(LDFLAGS_$(@F)_$(SYS)) $(LDFLAGS) -o $@ -t $(SYS) -m $@.map $^ $(SYS).lib
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# --------------------------------------------------------------------------
|
# --------------------------------------------------------------------------
|
||||||
@ -161,9 +155,7 @@ endif
|
|||||||
|
|
||||||
# disasm depends on cpp
|
# disasm depends on cpp
|
||||||
|
|
||||||
ifneq ($(SYS),sym1)
|
DIRLIST = tutorial geos
|
||||||
DIRLIST = tutorial geos
|
|
||||||
endif
|
|
||||||
|
|
||||||
# --------------------------------------------------------------------------
|
# --------------------------------------------------------------------------
|
||||||
# Lists of executables
|
# Lists of executables
|
||||||
@ -276,12 +268,10 @@ EXELIST_gamate = \
|
|||||||
hello
|
hello
|
||||||
|
|
||||||
EXELIST_geos-cbm = \
|
EXELIST_geos-cbm = \
|
||||||
helloworld \
|
|
||||||
ascii \
|
ascii \
|
||||||
diodemo
|
diodemo
|
||||||
|
|
||||||
EXELIST_geos-apple = \
|
EXELIST_geos-apple = \
|
||||||
helloworld \
|
|
||||||
ascii
|
ascii
|
||||||
|
|
||||||
EXELIST_lunix = \
|
EXELIST_lunix = \
|
||||||
@ -322,10 +312,7 @@ EXELIST_supervision = \
|
|||||||
supervisionhello
|
supervisionhello
|
||||||
|
|
||||||
EXELIST_sym1 = \
|
EXELIST_sym1 = \
|
||||||
helloworld \
|
helloworld
|
||||||
symHello \
|
|
||||||
symTiny \
|
|
||||||
symDisplay
|
|
||||||
|
|
||||||
EXELIST_telestrat = \
|
EXELIST_telestrat = \
|
||||||
ascii \
|
ascii \
|
||||||
|
8
samples/helloworld.c
Normal file
8
samples/helloworld.c
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
// Traditional "Hello World" program
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
printf("Hello, World!");
|
||||||
|
return 0;
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user