mirror of
https://github.com/jeremysrand/apple2048.git
synced 2025-08-07 12:26:59 +00:00
Create a basic build infrastructure
This commit is contained in:
31
Makefile
Normal file
31
Makefile
Normal 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
12
apple2048.c
Normal 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;
|
||||||
|
}
|
Reference in New Issue
Block a user