diff --git a/bacnet-stack/include/bacnet.h b/bacnet-stack/include/bacnet.h new file mode 100644 index 00000000..07e6e1b5 --- /dev/null +++ b/bacnet-stack/include/bacnet.h @@ -0,0 +1,39 @@ +/*####COPYRIGHTBEGIN#### + ------------------------------------------- + Copyright (C) 2005 Steve Karg + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version 2 + of the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to: + The Free Software Foundation, Inc. + 59 Temple Place - Suite 330 + Boston, MA 02111-1307, USA. + + As a special exception, if other files instantiate templates or + use macros or inline functions from this file, or you compile + this file and link it with other works to produce a work based + on this file, this file does not by itself cause the resulting + work to be covered by the GNU General Public License. However + the source code for this file must still be made available in + accordance with section (3) of the GNU General Public License. + + This exception does not invalidate any other reasons why a work + based on this file might be covered by the GNU General Public + License. + ------------------------------------------- +####COPYRIGHTEND####*/ +#ifndef BACNET_H +#define BACNET_H + + + +#endif diff --git a/bacnet-stack/ports/at91sam7s/makefile b/bacnet-stack/ports/at91sam7s/makefile index 354b5e58..98a601e6 100644 --- a/bacnet-stack/ports/at91sam7s/makefile +++ b/bacnet-stack/ports/at91sam7s/makefile @@ -7,6 +7,7 @@ TARGET=bacnet CC=arm-elf-gcc OBJCOPY=arm-elf-objcopy OBJDUMP=arm-elf-objdump +AR=arm-elf-ar LDSCRIPT=at91sam7s256.ld @@ -15,10 +16,12 @@ INCLUDES = -I. -I../.. -I../../demo/handler -I../../demo/object #OPTIMIZATION = -O0 OPTIMIZATION = -Os CFLAGS = -fno-common $(OPTIMIZATION) $(INCLUDES) $(BACNET_FLAGS) -Wall -g +LIBRARY = lib$(TARGET).a # -Wa, Pass comma-separated on to the assembler AFLAGS = -Wa,-ahls,-mapcs-32,-adhlns=$(<:.s=.lst) # -Wl, Pass comma-separated on to the linker -LDFLAGS = -nostartfiles -Wl,-Map=$(TARGET).map,-lc,-lgcc,-lm,-T$(LDSCRIPT) +LIBRARIES=-lc,-lgcc,-lm,-L=.,-l$(TARGET) +LDFLAGS = -nostartfiles -Wl,-nostdlib,-Map=$(TARGET).map,$(LIBRARIES),-T$(LDSCRIPT) CPFLAGS = --output-target=binary ODFLAGS = -x --syms @@ -34,14 +37,19 @@ PORTSRC = main.c \ ../../crc.c \ ../../mstp.c -CORESRC = device.c \ - ai.c \ +DEMOSRC = ai.c \ av.c \ bi.c \ bv.c \ h_rp.c \ h_wp.c \ - ../../npdu.c \ + device.c \ + ../../demo\handler\txbuf.c \ + ../../demo\handler\h_whois.c \ + ../../demo\handler\h_rd.c \ + ../../demo\handler\h_dcc.c + +CORESRC = ../../npdu.c \ ../../bacint.c \ ../../apdu.c \ ../../bacdcode.c \ @@ -56,17 +64,14 @@ CORESRC = device.c \ ../../dcc.c \ ../../rd.c \ ../../whois.c \ - ../../iam.c \ - ../../demo\handler\txbuf.c \ - ../../demo\handler\h_whois.c \ - ../../demo\handler\h_rd.c \ - ../../demo\handler\h_dcc.c + ../../iam.c -#CSRC = $(PORTSRC) $(CORESRC) +#CSRC = $(PORTSRC) $(DEMOSRC) $(CORESRC) CSRC = $(PORTSRC) AOBJ = $(ASRC:.s=.o) COBJ = $(CSRC:.c=.o) +COREOBJ = $(CORESRC:.c=.o) all: $(TARGET).bin $(OBJDUMP) $(ODFLAGS) $(TARGET).elf > $(TARGET).dmp @@ -74,9 +79,14 @@ all: $(TARGET).bin $(TARGET).bin: $(TARGET).elf $(OBJCOPY) $(TARGET).elf $(CPFLAGS) $(TARGET).bin -$(TARGET).elf: $(COBJ) $(AOBJ) Makefile +$(TARGET).elf: $(COBJ) $(AOBJ) $(LIBRARY) Makefile $(CC) $(CFLAGS) $(AOBJ) $(COBJ) $(LDFLAGS) -o $@ +lib: $(LIBRARY) + +$(LIBRARY): $(COREOBJ) Makefile + $(AR) rcs $@ $(COREOBJ) + $(COBJ): %.o : %.c Makefile $(CC) -c $(CFLAGS) $< -o $@ @@ -85,6 +95,7 @@ $(AOBJ): %.o : %.s Makefile clean: touch Makefile - rm $(COBJ) $(AOBJ) + rm $(COBJ) $(AOBJ) $(COREOBJ) rm $(TARGET).elf $(TARGET).bin $(TARGET).dmp $(TARGET).map + rm $(LIBRARY) rm *.lst