X-Git-Url: https://git.realraum.at/?a=blobdiff_plain;f=rf433ctl%2FMakefile;h=30a0031b93ab045f05c46ac57f878b5cdd532acd;hb=ed56aa9dd776a4eb9928895f84a6f8a3276eba84;hp=ec00211c4e60a4b90de67e8407ba38d46da2b345;hpb=b654506283c4f625e5ade66e2bc5eb22ad4d1545;p=svn42.git diff --git a/rf433ctl/Makefile b/rf433ctl/Makefile index ec00211..30a0031 100755 --- a/rf433ctl/Makefile +++ b/rf433ctl/Makefile @@ -1,7 +1,8 @@ ## see README file TARGET = rf433ctl -INSTALL_DIR = /home/equinox/realraum/rf433ctl/arduino +#TARGET = find_onewire +INSTALL_DIR = $(PWD)/arduino PORT = /dev/ttyUSB0 UPLOAD_RATE = 57600 AVRDUDE_PROGRAMMER = stk500v1 @@ -11,13 +12,15 @@ F_CPU = 16000000 ############################################################################ # Below here nothing should be changed... +RESET_TTY_DIR=../reset_tty/ +RESET_TTY=$(RESET_TTY_DIR)reset_tty ARDUINO = $(INSTALL_DIR)/hardware/cores/arduino AVR_TOOLS_PATH = /usr/bin SRC = $(ARDUINO)/pins_arduino.c $(ARDUINO)/wiring.c \ $(ARDUINO)/wiring_analog.c $(ARDUINO)/wiring_digital.c \ $(ARDUINO)/wiring_pulse.c $(ARDUINO)/wiring_serial.c \ $(ARDUINO)/wiring_shift.c $(ARDUINO)/WInterrupts.c -CXXSRC = $(ARDUINO)/HardwareSerial.cpp $(ARDUINO)/Print.cpp $(ARDUINO)/WMath.cpp +CXXSRC = OneWire/OneWire.cpp DallasTemperature/DallasTemperature.cpp $(ARDUINO)/HardwareSerial.cpp $(ARDUINO)/Print.cpp $(ARDUINO)/WMath.cpp IRremote/IRremote.cpp FORMAT = ihex @@ -36,8 +39,8 @@ CDEFS = -DF_CPU=$(F_CPU) CXXDEFS = -DF_CPU=$(F_CPU) # Place -I options here -CINCS = -I$(ARDUINO) -CXXINCS = -I$(ARDUINO) +CINCS = -I ./OneWire -I ./DallasTemperature -I ./IRremote -I$(ARDUINO) +CXXINCS = -I ./OneWire -I ./DallasTemperature -I ./IRremote -I$(ARDUINO) # Compiler flag to set the C Standard level. # c89 - "ANSI" C @@ -51,7 +54,7 @@ CTUNING = -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums #CEXTRA = -Wa,-adhlns=$(<:.c=.lst) CFLAGS = $(CDEBUG) $(CDEFS) $(CINCS) -O$(OPT) $(CWARN) $(CSTANDARD) $(CEXTRA) -CXXFLAGS = $(CDEFS) $(CINCS) -O$(OPT) +CXXFLAGS = $(CDEFS) $(CXXINCS) -O$(OPT) #ASFLAGS = -Wa,-adhlns=$(<:.S=.lst),-gstabs LDFLAGS = -lm @@ -113,7 +116,8 @@ lss: applet/$(TARGET).lss sym: applet/$(TARGET).sym # Program the device. -upload: applet/$(TARGET).hex +upload: applet/$(TARGET).hex $(RESET_TTY) + $(RESET_TTY) $(PORT) $(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) @@ -206,4 +210,7 @@ depend: >> $(MAKEFILE); \ $(CC) -M -mmcu=$(MCU) $(CDEFS) $(CINCS) $(SRC) $(ASRC) >> $(MAKEFILE) +$(RESET_TTY): + make -C $(RESET_TTY_DIR) + .PHONY: all build elf hex eep lss sym program coff extcoff clean depend applet_files sizebefore sizeafter