Changes in uspace/srv/fb/Makefile [cc1f8d4:e035612] in mainline


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/fb/Makefile

    rcc1f8d4 re035612  
    11#
    22# Copyright (c) 2005 Martin Decky
    3 # Copyright (c) 2007 Jakub Jermar
    43# All rights reserved.
    54#
     
    2827#
    2928
    30 include Makefile.common
     29## Setup toolchain
     30#
    3131
    32 .PHONY: all clean
     32LIBC_PREFIX = ../../lib/libc
     33SOFTINT_PREFIX = ../../lib/softint
    3334
    34 all: $(LIBC_PREFIX)/../../../Makefile.config $(LIBC_PREFIX)/../../../config.h $(LIBC_PREFIX)/../../../config.defs $(LIBS)
    35         -[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV)
    36         $(MAKE) -f Makefile.build
     35include $(LIBC_PREFIX)/Makefile.toolchain
     36
     37LIBS = $(LIBC_PREFIX)/libc.a
     38
     39## Sources
     40#
     41
     42OUTPUT = fb
     43SOURCES = \
     44        main.c \
     45        ppm.c
     46
     47ifneq ($(UARCH),ia64)
     48        SOURCES += fb.c \
     49                font-8x16.c
     50        CFLAGS += -DFB_ENABLED
     51endif
     52
     53ifeq ($(UARCH),ia32)
     54        SOURCES += ega.c
     55        CFLAGS += -DEGA_ENABLED
     56endif
     57
     58ifeq ($(UARCH),ia64)
     59        SOURCES += ega.c \
     60                ski.c \
     61                serial_console.c
     62        CFLAGS += -DSKI_ENABLED
     63        CFLAGS += -DEGA_ENABLED
     64endif
     65
     66ifeq ($(UARCH),amd64)
     67        SOURCES += ega.c
     68        CFLAGS += -DEGA_ENABLED
     69endif
     70
     71ifeq ($(UARCH),mips32)
     72        SOURCES += msim.c \
     73                serial_console.c
     74        CFLAGS += -DMSIM_ENABLED
     75endif
     76
     77ifeq ($(UARCH),sparc64)
     78        SOURCES += sgcn.c \
     79                serial_console.c
     80        CFLAGS += -DSGCN_ENABLED
     81endif
     82
     83CFLAGS += -D$(UARCH)
     84
     85
     86OBJECTS := $(addsuffix .o,$(basename $(SOURCES)))
     87
     88.PHONY: all clean depend
     89
     90all: $(OUTPUT) $(OUTPUT).disasm
     91
     92-include Makefile.depend
    3793
    3894clean:
    39         rm -f $(DEPEND) $(DEPEND_PREV) $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm
    40         find . -name '*.o' -follow -exec rm \{\} \;
     95        -rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend $(OBJECTS)
     96
     97depend:
     98        $(CC) $(DEFS) $(CFLAGS) -M $(SOURCES) > Makefile.depend
     99
     100$(OUTPUT): $(OBJECTS) $(LIBS)
     101        $(LD) -T $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map
     102
     103$(OUTPUT).disasm: $(OUTPUT)
     104        $(OBJDUMP) -d $< > $@
     105
     106%.o: %.S
     107        $(CC) $(DEFS) $(AFLAGS) $(CFLAGS) -D__ASM__ -c $< -o $@
     108
     109%.o: %.s
     110        $(AS) $(AFLAGS) $< -o $@
     111
     112%.o: %.c
     113        $(CC) $(DEFS) $(CFLAGS) -c $< -o $@
Note: See TracChangeset for help on using the changeset viewer.