2008-11-27 01:58:31 +08:00
|
|
|
############################################################################
|
2019-03-15 03:18:55 +08:00
|
|
|
# graphics/nxglib/Makefile.devblit
|
2008-11-27 01:58:31 +08:00
|
|
|
#
|
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
|
2008-11-27 01:58:31 +08:00
|
|
|
#
|
2021-02-05 18:12:53 +08:00
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
2008-11-27 01:58:31 +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.
|
2008-11-27 01:58:31 +08:00
|
|
|
#
|
|
|
|
############################################################################
|
|
|
|
|
2020-05-19 03:42:11 +08:00
|
|
|
include $(TOPDIR)/Make.defs
|
2008-11-27 01:58:31 +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
|
|
|
|
2008-11-27 01:58:31 +08:00
|
|
|
ifeq ($(NXGLIB_BITSPERPIXEL),1)
|
|
|
|
NXGLIB_SUFFIX := _1bpp
|
2011-08-01 01:33:24 +08:00
|
|
|
SETP_CSRC := nxglib_setpixel_1bpp.c
|
2008-11-29 02:27:10 +08:00
|
|
|
RFILL_CSRC := nxglib_fillrectangle_1bpp.c
|
2011-10-23 02:13:04 +08:00
|
|
|
RGET_CSRC := nxglib_getrectangle_1bpp.c
|
2008-11-29 02:27:10 +08:00
|
|
|
TFILL_CSRC := nxglib_filltrapezoid_1bpp.c
|
|
|
|
RMOVE_CSRC := nxglib_moverectangle_1bpp.c
|
|
|
|
RCOPY_CSRC := nxglib_copyrectangle_1bpp.c
|
2008-11-27 01:58:31 +08:00
|
|
|
endif
|
|
|
|
ifeq ($(NXGLIB_BITSPERPIXEL),2)
|
|
|
|
NXGLIB_SUFFIX := _2bpp
|
2011-08-01 01:33:24 +08:00
|
|
|
SETP_CSRC := nxglib_setpixel_2bpp.c
|
2008-11-29 02:27:10 +08:00
|
|
|
RFILL_CSRC := nxglib_fillrectangle_2bpp.c
|
2011-10-23 02:13:04 +08:00
|
|
|
RGET_CSRC := nxglib_getrectangle_2bpp.c
|
2008-11-29 02:27:10 +08:00
|
|
|
TFILL_CSRC := nxglib_filltrapezoid_2bpp.c
|
|
|
|
RMOVE_CSRC := nxglib_moverectangle_2bpp.c
|
|
|
|
RCOPY_CSRC := nxglib_copyrectangle_2bpp.c
|
2008-11-27 01:58:31 +08:00
|
|
|
endif
|
|
|
|
ifeq ($(NXGLIB_BITSPERPIXEL),4)
|
|
|
|
NXGLIB_SUFFIX := _4bpp
|
2011-08-01 01:33:24 +08:00
|
|
|
SETP_CSRC := nxglib_setpixel_4bpp.c
|
2008-11-29 02:27:10 +08:00
|
|
|
RFILL_CSRC := nxglib_fillrectangle_4bpp.c
|
2011-10-23 02:13:04 +08:00
|
|
|
RGET_CSRC := nxglib_getrectangle_4bpp.c
|
2008-11-29 02:27:10 +08:00
|
|
|
TFILL_CSRC := nxglib_filltrapezoid_4bpp.c
|
|
|
|
RMOVE_CSRC := nxglib_moverectangle_4bpp.c
|
|
|
|
RCOPY_CSRC := nxglib_copyrectangle_4bpp.c
|
2008-11-27 01:58:31 +08:00
|
|
|
endif
|
|
|
|
ifeq ($(NXGLIB_BITSPERPIXEL),8)
|
|
|
|
NXGLIB_SUFFIX := _8bpp
|
2011-08-01 01:33:24 +08:00
|
|
|
SETP_CSRC := nxglib_setpixel_8bpp.c
|
2008-11-29 02:27:10 +08:00
|
|
|
RFILL_CSRC := nxglib_fillrectangle_8bpp.c
|
2011-10-23 02:13:04 +08:00
|
|
|
RGET_CSRC := nxglib_getrectangle_8bpp.c
|
2008-11-29 02:27:10 +08:00
|
|
|
TFILL_CSRC := nxglib_filltrapezoid_8bpp.c
|
|
|
|
RMOVE_CSRC := nxglib_moverectangle_8bpp.c
|
|
|
|
RCOPY_CSRC := nxglib_copyrectangle_8bpp.c
|
2008-11-27 01:58:31 +08:00
|
|
|
endif
|
|
|
|
ifeq ($(NXGLIB_BITSPERPIXEL),16)
|
|
|
|
NXGLIB_SUFFIX := _16bpp
|
2011-08-01 01:33:24 +08:00
|
|
|
SETP_CSRC := nxglib_setpixel_16bpp.c
|
2008-11-29 02:27:10 +08:00
|
|
|
RFILL_CSRC := nxglib_fillrectangle_16bpp.c
|
2011-10-23 02:13:04 +08:00
|
|
|
RGET_CSRC := nxglib_getrectangle_16bpp.c
|
2008-11-29 02:27:10 +08:00
|
|
|
TFILL_CSRC := nxglib_filltrapezoid_16bpp.c
|
|
|
|
RMOVE_CSRC := nxglib_moverectangle_16bpp.c
|
|
|
|
RCOPY_CSRC := nxglib_copyrectangle_16bpp.c
|
2008-11-27 01:58:31 +08:00
|
|
|
endif
|
2008-11-27 02:59:52 +08:00
|
|
|
ifeq ($(NXGLIB_BITSPERPIXEL),24)
|
|
|
|
NXGLIB_SUFFIX := _24bpp
|
2011-08-01 01:33:24 +08:00
|
|
|
SETP_CSRC := nxglib_setpixel_24bpp.c
|
2008-11-29 02:27:10 +08:00
|
|
|
RFILL_CSRC := nxglib_fillrectangle_24bpp.c
|
2011-10-23 02:13:04 +08:00
|
|
|
RGET_CSRC := nxglib_getrectangle_24bpp.c
|
2008-11-29 02:27:10 +08:00
|
|
|
TFILL_CSRC := nxglib_filltrapezoid_24bpp.c
|
|
|
|
RMOVE_CSRC := nxglib_moverectangle_24bpp.c
|
|
|
|
RCOPY_CSRC := nxglib_copyrectangle_24bpp.c
|
2008-11-27 01:58:31 +08:00
|
|
|
endif
|
2008-11-27 02:59:52 +08:00
|
|
|
ifeq ($(NXGLIB_BITSPERPIXEL),32)
|
|
|
|
NXGLIB_SUFFIX := _32bpp
|
2011-08-01 01:33:24 +08:00
|
|
|
SETP_CSRC := nxglib_setpixel_32bpp.c
|
2008-11-29 02:27:10 +08:00
|
|
|
RFILL_CSRC := nxglib_fillrectangle_32bpp.c
|
2011-10-23 02:13:04 +08:00
|
|
|
RGET_CSRC := nxglib_getrectangle_32bpp.c
|
2008-11-29 02:27:10 +08:00
|
|
|
TFILL_CSRC := nxglib_filltrapezoid_32bpp.c
|
|
|
|
RMOVE_CSRC := nxglib_moverectangle_32bpp.c
|
|
|
|
RCOPY_CSRC := nxglib_copyrectangle_32bpp.c
|
2008-11-27 01:58:31 +08:00
|
|
|
endif
|
|
|
|
|
|
|
|
CPPFLAGS += -DNXGLIB_BITSPERPIXEL=$(NXGLIB_BITSPERPIXEL)
|
|
|
|
CPPFLAGS += -DNXGLIB_SUFFIX=$(NXGLIB_SUFFIX)
|
|
|
|
|
2011-08-01 01:33:24 +08:00
|
|
|
SETP_TMP = $(SETP_CSRC:.c=.i)
|
2008-12-05 07:01:43 +08:00
|
|
|
RFILL_TMP = $(RFILL_CSRC:.c=.i)
|
2011-10-23 02:13:04 +08:00
|
|
|
RGET_TMP = $(RGET_CSRC:.c=.i)
|
2008-12-05 07:01:43 +08:00
|
|
|
TFILL_TMP = $(TFILL_CSRC:.c=.i)
|
|
|
|
RMOVE_TMP = $(RMOVE_CSRC:.c=.i)
|
|
|
|
RCOPY_TMP = $(RCOPY_CSRC:.c=.i)
|
|
|
|
|
2011-10-23 02:13:04 +08:00
|
|
|
GEN_CSRCS = $(SETP_CSRC) $(RFILL_CSRC) $(RGET_CSRC) $(TFILL_CSRC) $(RMOVE_CSRC) $(RCOPY_CSRC)
|
2008-11-27 01:58:31 +08:00
|
|
|
|
2010-04-17 09:46:15 +08:00
|
|
|
ifeq ($(CONFIG_NX_LCDDRIVER),y)
|
|
|
|
BLITDIR = lcd
|
|
|
|
else
|
|
|
|
BLITDIR = fb
|
|
|
|
endif
|
|
|
|
|
2008-11-27 01:58:31 +08:00
|
|
|
all: $(GEN_CSRCS)
|
2020-04-25 21:02:17 +08:00
|
|
|
.PHONY : distclean
|
2008-11-27 02:59:52 +08:00
|
|
|
|
2011-08-01 01:33:24 +08:00
|
|
|
$(SETP_CSRC) : $(BLITDIR)/nxglib_setpixel.c nxglib_bitblit.h
|
|
|
|
ifneq ($(NXGLIB_BITSPERPIXEL),)
|
2012-11-18 02:54:53 +08:00
|
|
|
$(call PREPROCESS, $(BLITDIR)/nxglib_setpixel.c, $(SETP_TMP))
|
|
|
|
$(Q) cat $(SETP_TMP) | sed -e "/^#/d" >$@
|
|
|
|
$(Q) rm -f $(SETP_TMP)
|
2011-08-01 01:33:24 +08:00
|
|
|
endif
|
|
|
|
|
2010-04-17 09:46:15 +08:00
|
|
|
$(RFILL_CSRC) : $(BLITDIR)/nxglib_fillrectangle.c nxglib_bitblit.h
|
2008-11-27 02:59:52 +08:00
|
|
|
ifneq ($(NXGLIB_BITSPERPIXEL),)
|
2012-11-18 02:54:53 +08:00
|
|
|
$(call PREPROCESS, $(BLITDIR)/nxglib_fillrectangle.c, $(RFILL_TMP))
|
|
|
|
$(Q) cat $(RFILL_TMP) | sed -e "/^#/d" >$@
|
|
|
|
$(Q) rm -f $(RFILL_TMP)
|
2008-11-27 02:59:52 +08:00
|
|
|
endif
|
2008-11-27 01:58:31 +08:00
|
|
|
|
2011-10-23 02:13:04 +08:00
|
|
|
$(RGET_CSRC) : $(BLITDIR)/nxglib_getrectangle.c nxglib_bitblit.h
|
|
|
|
ifneq ($(NXGLIB_BITSPERPIXEL),)
|
2012-11-18 02:54:53 +08:00
|
|
|
$(call PREPROCESS, $(BLITDIR)/nxglib_getrectangle.c, $(RGET_TMP))
|
|
|
|
$(Q) cat $(RGET_TMP) | sed -e "/^#/d" >$@
|
|
|
|
$(Q) rm -f $(RGET_TMP)
|
2011-10-23 02:13:04 +08:00
|
|
|
endif
|
|
|
|
|
2010-04-17 09:46:15 +08:00
|
|
|
$(TFILL_CSRC) : $(BLITDIR)/nxglib_filltrapezoid.c nxglib_bitblit.h
|
2008-11-27 06:20:00 +08:00
|
|
|
ifneq ($(NXGLIB_BITSPERPIXEL),)
|
2012-11-18 02:54:53 +08:00
|
|
|
$(call PREPROCESS, $(BLITDIR)/nxglib_filltrapezoid.c, $(TFILL_TMP))
|
|
|
|
$(Q) cat $(TFILL_TMP) | sed -e "/^#/d" >$@
|
|
|
|
$(Q) rm -f $(TFILL_TMP)
|
2008-11-27 06:20:00 +08:00
|
|
|
endif
|
|
|
|
|
2010-04-17 09:46:15 +08:00
|
|
|
$(RMOVE_CSRC) : $(BLITDIR)/nxglib_moverectangle.c nxglib_bitblit.h
|
2008-11-27 03:39:54 +08:00
|
|
|
ifneq ($(NXGLIB_BITSPERPIXEL),)
|
2012-11-18 02:54:53 +08:00
|
|
|
$(call PREPROCESS, $(BLITDIR)/nxglib_moverectangle.c, $(RMOVE_TMP))
|
|
|
|
$(Q) cat $(RMOVE_TMP) | sed -e "/^#/d" >$@
|
|
|
|
$(Q) rm -f $(RMOVE_TMP)
|
2008-11-27 03:39:54 +08:00
|
|
|
endif
|
|
|
|
|
2010-04-17 09:46:15 +08:00
|
|
|
$(RCOPY_CSRC) : $(BLITDIR)/nxglib_copyrectangle.c nxglib_bitblit.h
|
2008-11-27 06:20:00 +08:00
|
|
|
ifneq ($(NXGLIB_BITSPERPIXEL),)
|
2012-11-18 02:54:53 +08:00
|
|
|
$(call PREPROCESS, $(BLITDIR)/nxglib_copyrectangle.c, $(RCOPY_TMP))
|
|
|
|
$(Q) cat $(RCOPY_TMP) | sed -e "/^#/d" >$@
|
|
|
|
$(Q) rm -f $(RCOPY_TMP)
|
2008-11-27 06:20:00 +08:00
|
|
|
endif
|
|
|
|
|
2020-04-25 21:02:17 +08:00
|
|
|
distclean:
|
2012-11-20 23:47:41 +08:00
|
|
|
$(call DELFILE, nxglib_setpixel_*bpp.c)
|
|
|
|
$(call DELFILE, nxglib_fillrectangle_*bpp.c)
|
|
|
|
$(call DELFILE, nxglib_getrectangle_*bpp.c)
|
|
|
|
$(call DELFILE, nxglib_filltrapezoid_*bpp.c)
|
|
|
|
$(call DELFILE, nxglib_moverectangle_*bpp.c)
|
|
|
|
$(call DELFILE, nxglib_copyrectangle_*bpp.c)
|