2019-04-10 01:32:42 +08:00
|
|
|
############################################################################
|
|
|
|
# graphics/nxglib/Makefile.cursor
|
|
|
|
#
|
2021-02-05 18:12:53 +08:00
|
|
|
# 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
|
2019-04-10 01:32:42 +08:00
|
|
|
#
|
2021-02-05 18:12:53 +08:00
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
2019-04-10 01:32:42 +08:00
|
|
|
#
|
2021-02-05 18:12:53 +08:00
|
|
|
# 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.
|
2019-04-10 01:32:42 +08:00
|
|
|
#
|
|
|
|
############################################################################
|
|
|
|
|
2020-05-19 03:42:11 +08:00
|
|
|
include $(TOPDIR)/Make.defs
|
2019-04-10 01:32:42 +08:00
|
|
|
|
2022-11-01 21:47:53 +08:00
|
|
|
CPPFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)graphics$(DELIM)nxglib
|
2020-05-19 17:43:29 +08:00
|
|
|
|
2019-04-10 01:32:42 +08:00
|
|
|
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)
|
2020-04-25 21:02:17 +08:00
|
|
|
.PHONY : distclean
|
2019-04-10 01:32:42 +08:00
|
|
|
|
|
|
|
$(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
|
|
|
|
|
2020-04-25 21:02:17 +08:00
|
|
|
distclean:
|
2019-04-10 01:32:42 +08:00
|
|
|
$(call DELFILE, nxglib_cursor_draw_*bpp.c)
|
|
|
|
$(call DELFILE, nxglib_cursor_erase_*bpp.c)
|
|
|
|
$(call DELFILE, nxglib_cursor_backup_*bpp.c)
|