diff options
| author | Joel Bodenmann <joel@unormal.org> | 2014-05-30 02:57:40 +0200 | 
|---|---|---|
| committer | Joel Bodenmann <joel@unormal.org> | 2014-05-30 02:57:40 +0200 | 
| commit | 54221783a041966eb8a4073bf882b97c5d6b2020 (patch) | |
| tree | 2bfd554b60a9cfd3c52ee50182457aa864c37198 /boards/base/Linux-Framebuffer/example | |
| parent | 41a74191c1965acff84d23d64a4ec3ed4565b604 (diff) | |
| parent | 1fce946adb748499cac7ecc1043bec52347e6d26 (diff) | |
| download | uGFX-54221783a041966eb8a4073bf882b97c5d6b2020.tar.gz uGFX-54221783a041966eb8a4073bf882b97c5d6b2020.tar.bz2 uGFX-54221783a041966eb8a4073bf882b97c5d6b2020.zip | |
Merge branch 'master' of https://bitbucket.org/Tectu/ugfx
Diffstat (limited to 'boards/base/Linux-Framebuffer/example')
| -rw-r--r-- | boards/base/Linux-Framebuffer/example/Makefile | 155 | ||||
| -rw-r--r-- | boards/base/Linux-Framebuffer/example/readme.txt | 5 | 
2 files changed, 160 insertions, 0 deletions
| diff --git a/boards/base/Linux-Framebuffer/example/Makefile b/boards/base/Linux-Framebuffer/example/Makefile new file mode 100644 index 00000000..66af4bdc --- /dev/null +++ b/boards/base/Linux-Framebuffer/example/Makefile @@ -0,0 +1,155 @@ +# +#       !!!! Do NOT edit this makefile with an editor which replace tabs by spaces !!!! +# +############################################################################################## +# +# On command line: +# +# make all = Create project +# +# make clean = Clean project files. +# +# To rebuild project do "make clean" and "make all". +# + +############################################################################################## +# Start of default section +# + +TRGT =  +CC   = $(TRGT)gcc +AS   = $(TRGT)gcc -x assembler-with-cpp + +# List all default C defines here, like -D_DEBUG=1 +DDEFS =  + +# List all default ASM defines here, like -D_DEBUG=1 +DADEFS = + +# List all default directories to look for include files here +DINCDIR = + +# List the default directory to look for the libraries here +DLIBDIR = + +# List all default libraries here +DLIBS = -lX11 -pthread -lrt + +# +# End of default section +############################################################################################## + +############################################################################################## +# Start of user section +# + +# Define project name here +PROJECT = ugfx + +# Imported source files and paths for uGFX +GFXLIB = ../ugfx +include ${GFXLIB}/gfx.mk +include ${GFXLIB}/boards/base/Linux-Framebuffer/board.mk + +# Where is our source code - alter these for your project. +# Either just include the demo makefile or add your own definitions +include $(GFXLIB)/demos/modules/gdisp/basics/demo.mk +#MYFILES = my-project-directory +#MYCSRC  = $(MYFILES)/main.c +#MYDEFS  = + +# List all user C define here, like -D_DEBUG=1 +UDEFS = $(MYDEFS) $(GFXDEFS) + +# Define ASM defines here +UADEFS = + +# List C source files here +SRC  = $(GFXSRC) \ +       $(MYCSRC) + +# List ASM source files here +ASRC = + +# List all user directories here +UINCDIR = $(MYFILES) $(GFXINC) + +# List the user directory to look for the libraries here +ULIBDIR = + +# List all user libraries here +ULIBS = + +# Define optimisation level here +OPT = -ggdb -O0 -fomit-frame-pointer + +# +# End of user defines +############################################################################################## + +INCDIR  = $(patsubst %,-I%,$(DINCDIR) $(UINCDIR)) +LIBDIR  = $(patsubst %,-L%,$(DLIBDIR) $(ULIBDIR)) +DEFS    = $(DDEFS) $(UDEFS) +ADEFS   = $(DADEFS) $(UADEFS) +OBJS    = $(ASRC:.s=.o) $(SRC:.c=.o) +LIBS    = $(DLIBS) $(ULIBS) + +ASFLAGS = -Wa,-amhls=$(<:.s=.lst) $(ADEFS) +CPFLAGS = $(OPT) -Wall -Wextra -Wstrict-prototypes -fverbose-asm $(DEFS)  + +ifeq ($(HOST_OSX),yes) +  ifeq ($(OSX_SDK),) +    OSX_SDK = /Developer/SDKs/MacOSX10.7.sdk +  endif +  ifeq ($(OSX_ARCH),) +    OSX_ARCH = -mmacosx-version-min=10.3 -arch i386 +  endif + +  CPFLAGS += -isysroot $(OSX_SDK) $(OSX_ARCH) +  LDFLAGS = -Wl -Map=$(PROJECT).map,-syslibroot,$(OSX_SDK),$(LIBDIR) +  LIBS += $(OSX_ARCH) +else +  # Linux, or other +  CPFLAGS += -m32 -Wa,-alms=$(<:.c=.lst) +  LDFLAGS = -m32 -Wl,-Map=$(PROJECT).map,--cref,--no-warn-mismatch $(LIBDIR) +endif + +# Generate dependency information +CPFLAGS += -MD -MP -MF .dep/$(@F).d + +# +# makefile rules +# + +all: $(OBJS) $(PROJECT) + +%.o : %.c +	$(CC) -c $(CPFLAGS) -I . $(INCDIR) $< -o $@ + +%.o : %.s +	$(AS) -c $(ASFLAGS) $< -o $@ + +$(PROJECT): $(OBJS) +	$(CC) $(OBJS) $(LDFLAGS) $(LIBS) -o $@ + +gcov: +	-mkdir gcov +	$(COV) -u $(subst /,\,$(SRC)) +	-mv *.gcov ./gcov + +clean:                                       +	-rm -f $(OBJS) +	-rm -f $(PROJECT) +	-rm -f $(PROJECT).map +	-rm -f $(SRC:.c=.c.bak) +	-rm -f $(SRC:.c=.lst) +	-rm -f $(ASRC:.s=.s.bak) +	-rm -f $(ASRC:.s=.lst) +	-rm -fR .dep + +# +# Include the dependency files, should be the last of the makefile +# +-include $(shell mkdir .dep 2>/dev/null) $(wildcard .dep/*) + +# *** EOF *** diff --git a/boards/base/Linux-Framebuffer/example/readme.txt b/boards/base/Linux-Framebuffer/example/readme.txt new file mode 100644 index 00000000..aff58bb1 --- /dev/null +++ b/boards/base/Linux-Framebuffer/example/readme.txt @@ -0,0 +1,5 @@ +Copy these files into your own project directory and alter them to suite. + +Notes: + +1/ Look at the MYFILES definition and the MYCSRC definition. | 
