OpenCores
URL https://opencores.org/ocsvn/gecko3/gecko3/trunk

Subversion Repositories gecko3

[/] [gecko3/] [trunk/] [GECKO3COM/] [gecko3com-fw/] [firmware/] [lib/] [Makefile] - Blame information for rev 32

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 9 nussgipfel
PACKAGE = libfx2.lib
2
 
3
#DEBUG = --debug -DDEBUG_LEVEL_ERROR
4
DEBUG =
5
 
6
FEATURES = -DUSB_DFU_SUPPORT
7
#FEATURES =
8
 
9
BUILD_DIR = build
10
INCLUDE_DIR = ../include
11
CC = sdcc
12
 
13
SRCS_C = \
14
         i2c.c          \
15
         delay.c        \
16
         fx2utils.c     \
17
         isr.c          \
18
         timer.c        \
19
         usb_common.c   \
20
         usb_dfu.c      \
21
         ser.c
22
SRCS_ASM = \
23
 
24
ASFLGS = -plosgff
25
 
26
CFLAGS = --opt-code-size --no-xinit-opt -mmcs51 --model-small $(FEATURES) $(DEBUG)
27
 
28
INCLUDE_DIR = ../include
29
LIB_DIR = ../lib
30
LIB = libfx2
31
BUILD_DIR = build
32
CC = sdcc
33
 
34
 
35
OBJS = $(SRCS_C:.c=.rel) $(SRCS_ASM:.asm=.rel)
36
 
37
all : $(BUILD_DIR) $(PACKAGE)
38
 
39
$(BUILD_DIR) :
40
        mkdir $@
41
 
42
$(BUILD_DIR)/%.rel : %.c
43
        $(CC) -c $(CFLAGS) -I$(INCLUDE_DIR) -o $@ $<
44
 
45
$(BUILD_DIR)/%.rel : %.asm
46
        cp $< $(BUILD_DIR)/; \
47
        cd $(BUILD_DIR); \
48
        asx8051 $(ASFLGS) $(BUILD_DIR)/$<
49
 
50
$(PACKAGE) : $(patsubst %,$(BUILD_DIR)/%,$(OBJS))
51
        for obj in $^; do sdcclib $@ $$obj; done
52
 
53
 
54
clean :
55
        rm -f $(PACKAGE) $(BUILD_DIR)/*
56
 
57
run : all
58
 
59
.PHONY : clean all

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.