Jump to content

make: *** No rule to make target `.build/obj/GFXSRC.o'


dswl

Recommended Posts

Hello,

I'm trying to get one of the demos to work on OS X. I followed every step on the "Getting Started" page and created a `os_osx64.mk` file as suggested by inmarket in this post to compile on x64 OS X.

The make gives the following error:

make: *** No rule to make target `.build/obj/GFXSRC.o', needed by `.build/demotest.elf'.  Stop.

The C compiler options:

C Compiler Options....
gcc -c -L/usr/local/lib -lSDL2 -I/usr/local/include/SDL2 -D_THREAD_SAFE -I/usr/local/include/SDL2 -D_THREAD_SAFE -I/usr/local/include/SDL2 -D_THREAD_SAFE -ggdb -O0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -mmacosx-version-min=10.11 -m64 -fomit-frame-pointer -Wall -Wextra -Wstrict-prototypes -fverbose-asm -MMD -MP -MF .build/dep/fakefile.o.d -I. -IGFXINC -I../ugfx -I../ugfx/3rdparty/tinygl-0.4-ugfx/include -I../ugfx/boards/base/OSX -I../ugfx/drivers/multiple/SDL -I../ugfx/demos/modules/gdisp/basics -I../ugfx/demos/modules/gdisp/basics -I../ugfx -I../ugfx/3rdparty/tinygl-0.4-ugfx/include -I../ugfx/boards/base/OSX -I../ugfx/drivers/multiple/SDL -I../ugfx/demos/modules/gdisp/basics -DGFX_USE_OS_OSX=TRUE -DGFX_OS_PRE_INIT_FUNCTION=sdl_driver_init -DGFX_USE_OS_OSX=TRUE -DGFX_OS_PRE_INIT_FUNCTION=sdl_driver_init fakefile.c -o .build/obj/fakefile.o

The linker command:

Linker Options........
gcc -L/usr/local/lib -lSDL2 -I/usr/local/include/SDL2 -D_THREAD_SAFE -L/usr/local/lib -lSDL2 -I/usr/local/include/SDL2 -D_THREAD_SAFE -pthread -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -mmacosx-version-min=10.11 -m64 -nostartfiles .build/obj/fakefile.o -o .build/demotest.elf

I modified the Makefile from `ugfx/boards/base/OSX` as follows:

# Possible Targets:	all clean Debug cleanDebug Release cleanRelease

##############################################################################################
# Settings
#

# General settings
	# See $(GFXLIB)/tools/gmake_scripts/readme.txt for the list of variables
	OPT_OS					= osx64
	OPT_LINK_OPTIMIZE		= no

# uGFX settings
	# See $(GFXLIB)/tools/gmake_scripts/library_ugfx.mk for the list of variables
	GFXLIB					= ../ugfx
	GFXBOARD				= OSX
	GFXDEMO					= modules/gdisp/basics

# OSX settings
	# See $(GFXLIB)/tools/gmake_scripts/os_osx.mk for the list of variables
	OSX_SDK = /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk
	OSX_ARCH = -mmacosx-version-min=10.11

##############################################################################################
# Set these for your project
#

ARCH     =
SRCFLAGS = -ggdb -O0
CFLAGS   = `sdl2-config --libs --cflags`
CXXFLAGS =
ASFLAGS  =
LDFLAGS  =

SRC      = GFXSRC
OBJS     =
DEFS     =
LIBS     =
INCPATH  = GFXINC
LIBPATH  =

##############################################################################################
# These should be at the end
#

include $(GFXLIB)/gfx.mk
include $(GFXLIB)/demos/modules/gwin/widgets/demo.mk
include $(GFXLIB)/tools/gmake_scripts/library_ugfx.mk
include $(GFXLIB)/tools/gmake_scripts/os_$(OPT_OS).mk
include $(GFXLIB)/tools/gmake_scripts/compiler_gcc.mk
# *** EOF ***

I use uGFX 2.7 on OS X 10.11.6. `gfxconf.example.h` is copied to my project folder, renamed to `gfxconf.h` and further untouched.

I appreciate any help pointing me out to what I'm doing wrong.

Regards

Edited by dswl
Link to comment
Share on other sites

Hello @dswl and welcome to the µGFX community!

The problem is caused by having GFXSRC and GFXINC in your Makefile there. Simply remove them and everything should work.
The Makefile you're using there is the high-level Makefile provided by the µGFX library. The $(GFXSRC) and $(GFXINC) variables mentioned in the documentation are already being included internally.

I hope that helps!

Link to comment
Share on other sites

Thanks for your kind reply! Removing GFXSRC and GFXINC indeed removed the error, but unfortunately I ran into another problem.

As it is unrelated, I created a new thread here: 

 

I would appreciate your help.

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...