Create a basic build infrastructure

This commit is contained in:
Jeremy Rand 2014-07-23 08:20:45 -05:00
commit 400016a010
2 changed files with 43 additions and 0 deletions

31
Makefile Normal file
View File

@ -0,0 +1,31 @@
APP=a2048
SYS=$(APP).system.sys
MAPFILE=$(APP).map
INSTALL_DIR=~/Documents/"Apple ]["/Transfer
SRCS=$(wildcard *.c)
ASM=$(wildcard *.s)
C_OBJS=$(SRCS:.c=.o)
ASM_OBJS=$(ASM:.s=.o)
OBJS=$(C_OBJS) $(ASM_OBJS)
PLATFORM=apple2
PLATFORM_CFG=-C apple2-system.cfg
all: $(SYS)
%.o: %.s
ca65 -t $(PLATFORM) -o $@ $<
$(SYS): $(ASM_OBJS) $(SRCS)
cl65 -t $(PLATFORM) $(PLATFORM_CFG) --mapfile $(MAPFILE) -o $(SYS) $(SRCS) $(addprefix --obj ,$(ASM_OBJS))
clean:
rm -f $(SYS) $(OBJS) $(GEN_ASM) $(MAPFILE)
install: $(SYS)
cp $(SYS) $(INSTALL_DIR)

12
apple2048.c Normal file
View File

@ -0,0 +1,12 @@
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
int main(void)
{
printf("DOES THIS WORK...\n");
while (!kbhit()) {
}
return 0;
}