source: mainline/uspace/srv/fb/Makefile@ d2c1fd5

lfn serial ticket/834-toolchain-update topic/msim-upgrade topic/simplify-dev-export
Last change on this file since d2c1fd5 was 113c677, checked in by Martin Decky <martin@…>, 17 years ago

reintroduce support for MSIM text console in user space

  • Property mode set to 100644
File size: 2.6 KB
Line 
1#
2# Copyright (c) 2005 Martin Decky
3# All rights reserved.
4#
5# Redistribution and use in source and binary forms, with or without
6# modification, are permitted provided that the following conditions
7# are met:
8#
9# - Redistributions of source code must retain the above copyright
10# notice, this list of conditions and the following disclaimer.
11# - Redistributions in binary form must reproduce the above copyright
12# notice, this list of conditions and the following disclaimer in the
13# documentation and/or other materials provided with the distribution.
14# - The name of the author may not be used to endorse or promote products
15# derived from this software without specific prior written permission.
16#
17# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27#
28
29## Setup toolchain
30#
31
32LIBC_PREFIX = ../../lib/libc
33SOFTINT_PREFIX = ../../lib/softint
34include $(LIBC_PREFIX)/Makefile.toolchain
35
36CFLAGS += -I../libipc/include
37
38LIBS = $(LIBC_PREFIX)/libc.a
39
40## Sources
41#
42
43OUTPUT = fb
44SOURCES = \
45 main.c \
46 ppm.c
47
48ifneq ($(ARCH), ia64)
49 SOURCES += fb.c \
50 font-8x16.c
51 CFLAGS += -DFB_ENABLED
52endif
53ifeq ($(ARCH), ia32)
54 SOURCES += ega.c
55 CFLAGS += -DEGA_ENABLED
56endif
57ifeq ($(ARCH), amd64)
58 SOURCES += ega.c
59 CFLAGS += -DEGA_ENABLED
60endif
61ifeq ($(ARCH), mips32)
62 SOURCES += msim.c
63 CFLAGS += -DMSIM_ENABLED -DFB_INVERT_ENDIAN
64endif
65
66CFLAGS += -D$(ARCH)
67
68
69OBJECTS := $(addsuffix .o,$(basename $(SOURCES)))
70
71.PHONY: all clean depend disasm
72
73all: $(OUTPUT) $(OUTPUT).disasm
74
75-include Makefile.depend
76
77clean:
78 -rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend
79
80depend:
81 $(CC) $(DEFS) $(CFLAGS) -M $(SOURCES) > Makefile.depend
82
83$(OUTPUT): $(OBJECTS) $(LIBS)
84 $(LD) -T $(LIBC_PREFIX)/arch/$(ARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map
85
86disasm: $(OUTPUT).disasm
87
88$(OUTPUT).disasm: $(OUTPUT)
89 $(OBJDUMP) -d $< >$@
90
91%.o: %.S
92 $(CC) $(DEFS) $(AFLAGS) $(CFLAGS) -D__ASM__ -c $< -o $@
93
94%.o: %.s
95 $(AS) $(AFLAGS) $< -o $@
96
97%.o: %.c
98 $(CC) $(DEFS) $(CFLAGS) -c $< -o $@
Note: See TracBrowser for help on using the repository browser.