| ############################################################################ |
| # graphics/nxglib/Makefile.cursor |
| # |
| # SPDX-License-Identifier: Apache-2.0 |
| # |
| # Licensed to the Apache Software Foundation (ASF) under one or more |
| # contributor license agreements. See the NOTICE file distributed with |
| # this work for additional information regarding copyright ownership. The |
| # ASF licenses this file to you under the Apache License, Version 2.0 (the |
| # "License"); you may not use this file except in compliance with the |
| # License. You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| # License for the specific language governing permissions and limitations |
| # under the License. |
| # |
| ############################################################################ |
| |
| include $(TOPDIR)/Make.defs |
| |
| CPPFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)graphics$(DELIM)nxglib |
| |
| ifeq ($(NXGLIB_BITSPERPIXEL),8) |
| NXGLIB_SUFFIX := _8bpp |
| DRAW_CSRC := nxglib_cursor_draw_8bpp.c |
| ERASE_CSRC := nxglib_cursor_erase_8bpp.c |
| BACKUP_CSRC := nxglib_cursor_backup_8bpp.c |
| endif |
| ifeq ($(NXGLIB_BITSPERPIXEL),16) |
| NXGLIB_SUFFIX := _16bpp |
| DRAW_CSRC := nxglib_cursor_draw_16bpp.c |
| ERASE_CSRC := nxglib_cursor_erase_16bpp.c |
| BACKUP_CSRC := nxglib_cursor_backup_16bpp.c |
| endif |
| ifeq ($(NXGLIB_BITSPERPIXEL),24) |
| NXGLIB_SUFFIX := _24bpp |
| DRAW_CSRC := nxglib_cursor_draw_24bpp.c |
| ERASE_CSRC := nxglib_cursor_erase_24bpp.c |
| BACKUP_CSRC := nxglib_cursor_backup_24bpp.c |
| endif |
| ifeq ($(NXGLIB_BITSPERPIXEL),32) |
| NXGLIB_SUFFIX := _32bpp |
| DRAW_CSRC := nxglib_cursor_draw_32bpp.c |
| ERASE_CSRC := nxglib_cursor_erase_32bpp.c |
| BACKUP_CSRC := nxglib_cursor_backup_32bpp.c |
| endif |
| |
| CPPFLAGS += -DNXGLIB_BITSPERPIXEL=$(NXGLIB_BITSPERPIXEL) |
| CPPFLAGS += -DNXGLIB_SUFFIX=$(NXGLIB_SUFFIX) |
| |
| DRAW_TMP = $(DRAW_CSRC:.c=.i) |
| ERASE_TMP = $(ERASE_CSRC:.c=.i) |
| BACKUP_TMP = $(BACKUP_CSRC:.c=.i) |
| |
| GEN_CSRCS = $(DRAW_CSRC) $(ERASE_CSRC) $(BACKUP_CSRC) |
| |
| BLITDIR = cursor |
| |
| all: $(GEN_CSRCS) |
| .PHONY : distclean |
| |
| $(DRAW_CSRC) : $(BLITDIR)/nxglib_cursor_draw.c nxglib_bitblit.h |
| ifneq ($(NXGLIB_BITSPERPIXEL),) |
| $(call PREPROCESS, $(BLITDIR)/nxglib_cursor_draw.c, $(DRAW_TMP)) |
| $(Q) cat $(DRAW_TMP) | sed -e "/^#/d" >$@ |
| $(Q) rm -f $(DRAW_TMP) |
| endif |
| |
| $(ERASE_CSRC) : $(BLITDIR)/nxglib_cursor_erase.c nxglib_bitblit.h |
| ifneq ($(NXGLIB_BITSPERPIXEL),) |
| $(call PREPROCESS, $(BLITDIR)/nxglib_cursor_erase.c, $(ERASE_TMP)) |
| $(Q) cat $(ERASE_TMP) | sed -e "/^#/d" >$@ |
| $(Q) rm -f $(ERASE_TMP) |
| endif |
| |
| $(BACKUP_CSRC) : $(BLITDIR)/nxglib_cursor_backup.c nxglib_bitblit.h |
| ifneq ($(NXGLIB_BITSPERPIXEL),) |
| $(call PREPROCESS, $(BLITDIR)/nxglib_cursor_backup.c, $(BACKUP_TMP)) |
| $(Q) cat $(BACKUP_TMP) | sed -e "/^#/d" >$@ |
| $(Q) rm -f $(BACKUP_TMP) |
| endif |
| |
| distclean: |
| $(call DELFILE, nxglib_cursor_draw_*bpp.c) |
| $(call DELFILE, nxglib_cursor_erase_*bpp.c) |
| $(call DELFILE, nxglib_cursor_backup_*bpp.c) |