dbuchwald / 6502

DB6502: 65C02 based computer inspired by BE6502
MIT License
144 stars 29 forks source link

Makefile - common C sources #1

Closed jco2641 closed 4 years ago

jco2641 commented 4 years ago

I added a C source file common/source/lcd.c and its header common/include/lcd.h to my source tree. In the project directory makefile I added lcd.o to COMMON_DEPS. When I run make I get the following output:

cc65 --cpu 65C02 -t none -O -I ../common/include -o ../build/common/lcd.s ../common/source/lcd.c
ca65 --cpu 65C02 -o ../build/common/lcd.o -l ../build/common/lcd.lst ../build/../common/source/lcd.s
Fatal error: Cannot open input file '../build/../common/source/lcd.s': No such file or directory
../common/makefile:74: recipe for target '../build/common/lcd.o' failed

It should be looking for build/common/lcd.s (which has just been created by cc65) for the ca65 step.

dbuchwald commented 4 years ago

This should get you sorted out. Thanks for spotting this, I haven't tested common C sources scenario yet.