From 63d82fcaeb78d0764f39667b937262ed4a692c17 Mon Sep 17 00:00:00 2001 From: tmk Date: Thu, 7 Jun 2012 12:35:24 +0900 Subject: [PATCH] Fixed Makefile to adjust new directories. --- adb_usb/Makefile | 8 +++++--- common.mk | 5 +---- common/mousekey.c | 0 hbk/Makefile | 8 +++++--- hhkb/Makefile.iwrap | 10 ++++++---- hhkb/Makefile.pjrc | 8 +++++--- hhkb/Makefile.vusb | 8 +++++--- hhkb/doc/Bluetooth_img/BT_circuit.jpg | Bin m0110_usb/Makefile | 8 +++++--- macway/Makefile | 8 +++++--- protocol/iwrap.mk | 2 +- protocol/pjrc.mk | 2 +- protocol/vusb.mk | 2 +- ps2_usb/Makefile | 8 +++++--- ps2_usb/Makefile.pjrc_usart | 8 +++++--- ps2_usb/Makefile.vusb | 8 +++++--- rules.mk | 12 +++++++++--- sony_usb/Makefile.pjrc | 8 +++++--- terminal_usb/Makefile.102_pjrc | 8 +++++--- terminal_usb/Makefile.122_pjrc | 8 +++++--- x68k_usb/Makefile | 8 +++++--- 21 files changed, 84 insertions(+), 53 deletions(-) mode change 100755 => 100644 common/mousekey.c mode change 100755 => 100644 hhkb/doc/Bluetooth_img/BT_circuit.jpg diff --git a/adb_usb/Makefile b/adb_usb/Makefile index f4c5031cb6c2f291e25944d28e6f566fae84d24e..97850b0e86c23ea09178e7e6bc547294e4c566b5 100644 --- a/adb_usb/Makefile +++ b/adb_usb/Makefile @@ -2,7 +2,7 @@ TARGET = adb_usb # Directory common source filess exist -COMMON_DIR = .. +TOP_DIR = .. # Directory keyboard dependent files exist TARGET_DIR = . @@ -48,5 +48,7 @@ PROGRAM_CMD = teensy_loader_cli -mmcu=$(MCU) -w -v $(TARGET).hex -include $(COMMON_DIR)/pjrc.mk -include $(COMMON_DIR)/common.mk +include $(TOP_DIR)/protocol/pjrc.mk +include $(TOP_DIR)/protocol.mk +include $(TOP_DIR)/common.mk +include $(TOP_DIR)/rules.mk diff --git a/common.mk b/common.mk index 03cbc296d8207732c1b0418b8fa754bf8c66c402..d0e04df862fdc13c0e3b05dd4d844948d273d056 100644 --- a/common.mk +++ b/common.mk @@ -33,7 +33,4 @@ ifdef $(or MOUSEKEY_ENABLE, PS2_MOUSE_ENABLE) endif # Search Path -VPATH += $(COMMON_DIR) - - -include $(COMMON_DIR)/rules.mk +VPATH += $(TOP_DIR)/common diff --git a/common/mousekey.c b/common/mousekey.c old mode 100755 new mode 100644 diff --git a/hbk/Makefile b/hbk/Makefile index e03b45e3a434012f7bc7f7f7d07feb38266dd553..c441e2d7aeb91da0c2954743af6ee5ee89c65542 100644 --- a/hbk/Makefile +++ b/hbk/Makefile @@ -2,7 +2,7 @@ TARGET = hbk # Directory common source filess exist -COMMON_DIR = .. +TOP_DIR = .. # Directory keyboard dependent files exist TARGET_DIR = . @@ -50,5 +50,7 @@ PROGRAM_CMD = /opt/dfu-programmer-0.5.2/bin/dfu-programmer $(MCU) erase && \ -include $(COMMON_DIR)/pjrc.mk -include $(COMMON_DIR)/common.mk +include $(TOP_DIR)/protocol/pjrc.mk +include $(TOP_DIR)/protocol.mk +include $(TOP_DIR)/common.mk +include $(TOP_DIR)/rules.mk diff --git a/hhkb/Makefile.iwrap b/hhkb/Makefile.iwrap index cf020b94aa84fd46393bdf7821b21211a182d105..d922b0f501395b489a7ffa8aa3a2021232a79128 100644 --- a/hhkb/Makefile.iwrap +++ b/hhkb/Makefile.iwrap @@ -7,7 +7,7 @@ TARGET = hhkb_iwrap # Directory common source filess exist -COMMON_DIR = .. +TOP_DIR = .. # Directory keyboard dependent files exist TARGET_DIR = . @@ -85,7 +85,9 @@ PROGRAM_CMD = $(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE # Search Path VPATH = $(TARGET_DIR) -include $(COMMON_DIR)/iwrap.mk +include $(TOP_DIR)/protocol/iwrap.mk # To be swatchable btween Bluetooth and USB. Comment out if you don't need USB. -include $(COMMON_DIR)/vusb.mk -include $(COMMON_DIR)/common.mk +include $(TOP_DIR)/protocol/vusb.mk +include $(TOP_DIR)/protocol.mk +include $(TOP_DIR)/common.mk +include $(TOP_DIR)/rules.mk diff --git a/hhkb/Makefile.pjrc b/hhkb/Makefile.pjrc index 17aa865ddcdcdf8e91da3e10f39ca37b51214f0a..28b6b589dd04d7fac84f44b88a8281f49b435cb3 100644 --- a/hhkb/Makefile.pjrc +++ b/hhkb/Makefile.pjrc @@ -7,7 +7,7 @@ TARGET = hhkb_pjrc # Directory common source filess exist -COMMON_DIR = .. +TOP_DIR = .. # Directory keyboard dependent files exist TARGET_DIR = . @@ -54,5 +54,7 @@ PROGRAM_CMD = teensy_loader_cli -mmcu=$(MCU) -w -v $(TARGET).hex # Search Path VPATH = $(TARGET_DIR) -include $(COMMON_DIR)/pjrc.mk -include $(COMMON_DIR)/common.mk +include $(TOP_DIR)/protocol/pjrc.mk +include $(TOP_DIR)/protocol.mk +include $(TOP_DIR)/common.mk +include $(TOP_DIR)/rules.mk diff --git a/hhkb/Makefile.vusb b/hhkb/Makefile.vusb index 371b366900679ad808506ea0e32fd9ba1126cce6..734b73a029187fd77ded33a07b18b700d078ae00 100644 --- a/hhkb/Makefile.vusb +++ b/hhkb/Makefile.vusb @@ -7,7 +7,7 @@ TARGET = hhkb_vusb # Directory common source filess exist -COMMON_DIR = .. +TOP_DIR = .. # Directory keyboard dependent files exist TARGET_DIR = . @@ -85,5 +85,7 @@ PROGRAM_CMD = $(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE # Search Path VPATH = $(TARGET_DIR) -include $(COMMON_DIR)/vusb.mk -include $(COMMON_DIR)/common.mk +include $(TOP_DIR)/protocol/vusb.mk +include $(TOP_DIR)/protocol.mk +include $(TOP_DIR)/common.mk +include $(TOP_DIR)/rules.mk diff --git a/hhkb/doc/Bluetooth_img/BT_circuit.jpg b/hhkb/doc/Bluetooth_img/BT_circuit.jpg old mode 100755 new mode 100644 diff --git a/m0110_usb/Makefile b/m0110_usb/Makefile index fccfaa521b6dc31f2ce2d0ca3126e3ee9adec175..e4fa526c55c6b2fd324342b622f806405b5160e3 100644 --- a/m0110_usb/Makefile +++ b/m0110_usb/Makefile @@ -2,7 +2,7 @@ TARGET = m0110 # Directory common source filess exist -COMMON_DIR = .. +TOP_DIR = .. # Directory keyboard dependent files exist TARGET_DIR = . @@ -48,8 +48,10 @@ PROGRAM_CMD = teensy_loader_cli -mmcu=$(MCU) -w -v $(TARGET).hex -include $(COMMON_DIR)/pjrc.mk -include $(COMMON_DIR)/common.mk +include $(TOP_DIR)/protocol/pjrc.mk +include $(TOP_DIR)/protocol.mk +include $(TOP_DIR)/common.mk +include $(TOP_DIR)/rules.mk hasu: EXTRAFLAGS += -DHASU hasu: all diff --git a/macway/Makefile b/macway/Makefile index b8b0a85e1e6bebd90f0682771d1d7fd7e0eaac9d..83d31b67476bf6fad5ed027de224ce0dddf78cb0 100644 --- a/macway/Makefile +++ b/macway/Makefile @@ -2,7 +2,7 @@ TARGET = macway # Directory common source filess exist -COMMON_DIR = .. +TOP_DIR = .. # Directory keyboard dependent files exist TARGET_DIR = . @@ -47,5 +47,7 @@ PROGRAM_CMD = teensy_loader_cli -mmcu=$(MCU) -w -v $(TARGET).hex -include $(COMMON_DIR)/pjrc.mk -include $(COMMON_DIR)/common.mk +include $(TOP_DIR)/protocol/pjrc.mk +include $(TOP_DIR)/protocol.mk +include $(TOP_DIR)/common.mk +include $(TOP_DIR)/rules.mk diff --git a/protocol/iwrap.mk b/protocol/iwrap.mk index ea4a6e9720eee1df0d9e814561b7eca0a387b4d3..d9906fd1b4724b270c8462a832fd35a32ed8f051 100644 --- a/protocol/iwrap.mk +++ b/protocol/iwrap.mk @@ -7,4 +7,4 @@ SRC += iwrap.c \ # Search Path -VPATH += $(COMMON_DIR)/iwrap +VPATH += $(TOP_DIR)/protocol/iwrap diff --git a/protocol/pjrc.mk b/protocol/pjrc.mk index e13a809a1a1c36bd2c50d2a1c1d49a46e54dc9d2..1ee45e9ec9d30ba5bd112ed53488be3e05981e6f 100644 --- a/protocol/pjrc.mk +++ b/protocol/pjrc.mk @@ -8,7 +8,7 @@ SRC += pjrc.c \ # Search Path -VPATH += $(COMMON_DIR):$(COMMON_DIR)/pjrc +VPATH += $(TOP_DIR)/protocol/pjrc # Option modules diff --git a/protocol/vusb.mk b/protocol/vusb.mk index 9426efb25a5917942052ae22837d5cc100e45fe5..9e8e1fb39e3dbf30bd85869205f354366d0dc41f 100644 --- a/protocol/vusb.mk +++ b/protocol/vusb.mk @@ -16,4 +16,4 @@ endif # Search Path -VPATH += $(COMMON_DIR)/vusb:$(COMMON_DIR)/vusb/usbdrv +VPATH += $(TOP_DIR)/protocol/vusb:$(TOP_DIR)/protocol/vusb/usbdrv diff --git a/ps2_usb/Makefile b/ps2_usb/Makefile index f003aea01d6d1648d4c185dc43f471b314d6e4bd..515e6899fe2d7bfe0543369b3a52e910cea83bec 100644 --- a/ps2_usb/Makefile +++ b/ps2_usb/Makefile @@ -7,7 +7,7 @@ TARGET = ps2_usb_pjrc # Directory common source filess exist -COMMON_DIR = .. +TOP_DIR = .. # Directory keyboard dependent files exist TARGET_DIR = . @@ -52,5 +52,7 @@ PROGRAM_CMD = teensy_loader_cli -mmcu=$(MCU) -w -v $(TARGET).hex -include $(COMMON_DIR)/pjrc.mk -include $(COMMON_DIR)/common.mk +include $(TOP_DIR)/protocol/pjrc.mk +include $(TOP_DIR)/protocol.mk +include $(TOP_DIR)/common.mk +include $(TOP_DIR)/rules.mk diff --git a/ps2_usb/Makefile.pjrc_usart b/ps2_usb/Makefile.pjrc_usart index e620e66c250b5c00fc4b2a2323bfd63455dfe9d5..2e570e7107f7b72c6e8d54c0e03cd535592d52d7 100644 --- a/ps2_usb/Makefile.pjrc_usart +++ b/ps2_usb/Makefile.pjrc_usart @@ -7,7 +7,7 @@ TARGET = ps2_usb_pjrc_usart # Directory common source filess exist -COMMON_DIR = .. +TOP_DIR = .. # Directory keyboard dependent files exist TARGET_DIR = . @@ -52,5 +52,7 @@ PROGRAM_CMD = teensy_loader_cli -mmcu=$(MCU) -w -v $(TARGET).hex -include $(COMMON_DIR)/pjrc.mk -include $(COMMON_DIR)/common.mk +include $(TOP_DIR)/protocol/pjrc.mk +include $(TOP_DIR)/protocol.mk +include $(TOP_DIR)/common.mk +include $(TOP_DIR)/rules.mk diff --git a/ps2_usb/Makefile.vusb b/ps2_usb/Makefile.vusb index 5b6978f015128f3cec20339767ed6e7316deb1be..d85f1d55d50e5d191e51262c87e47077de49fe72 100644 --- a/ps2_usb/Makefile.vusb +++ b/ps2_usb/Makefile.vusb @@ -7,7 +7,7 @@ TARGET = ps2_usb_vusb # Directory common source filess exist -COMMON_DIR = .. +TOP_DIR = .. # Directory keyboard dependent files exist TARGET_DIR = . @@ -86,5 +86,7 @@ PROGRAM_CMD = $(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE -include $(COMMON_DIR)/vusb.mk -include $(COMMON_DIR)/common.mk +include $(TOP_DIR)/protocol/vusb.mk +include $(TOP_DIR)/protocol.mk +include $(TOP_DIR)/common.mk +include $(TOP_DIR)/rules.mk diff --git a/rules.mk b/rules.mk index 9143f9bcff2f03134713d6bce9140963896c9b44..104031fbb27bc4568ecfd84213d2d10c817789fc 100644 --- a/rules.mk +++ b/rules.mk @@ -121,7 +121,9 @@ CFLAGS += -Wstrict-prototypes CFLAGS += -Wa,-adhlns=$(@:%.o=%.lst) CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS)) CFLAGS += $(CSTANDARD) -CFLAGS += -include $(CONFIG_H) +ifdef CONFIG_H + CFLAGS += -include $(CONFIG_H) +endif #---------------- Compiler Options C++ ---------------- @@ -149,7 +151,9 @@ CPPFLAGS += -Wundef CPPFLAGS += -Wa,-adhlns=$(@:%.o=%.lst) CPPFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS)) #CPPFLAGS += $(CSTANDARD) -CPPFLAGS += -include $(CONFIG_H) +ifdef CONFIG_H + CPPFLAGS += -include $(CONFIG_H) +endif #---------------- Assembler Options ---------------- @@ -162,7 +166,9 @@ CPPFLAGS += -include $(CONFIG_H) # -listing-cont-lines: Sets the maximum number of continuation lines of hex # dump that will be displayed for a given single line of source input. ASFLAGS = $(ADEFS) -Wa,-adhlns=$(@:%.o=%.lst),-gstabs,--listing-cont-lines=100 -ASFLAGS += -include $(CONFIG_H) +ifdef CONFIG_H + ASFLAGS += -include $(CONFIG_H) +endif #---------------- Library Options ---------------- diff --git a/sony_usb/Makefile.pjrc b/sony_usb/Makefile.pjrc index 2a4eeff13aec0196ad0020bfd4accfbba8208db0..b7e22dfaceb341f0819d2d6a97e80b96726dce8b 100644 --- a/sony_usb/Makefile.pjrc +++ b/sony_usb/Makefile.pjrc @@ -7,7 +7,7 @@ TARGET = news_usb_pjrc # Directory common source filess exist -COMMON_DIR = .. +TOP_DIR = .. # Directory keyboard dependent files exist TARGET_DIR = . @@ -52,5 +52,7 @@ PROGRAM_CMD = teensy_loader_cli -mmcu=$(MCU) -w -v $(TARGET).hex -include $(COMMON_DIR)/pjrc.mk -include $(COMMON_DIR)/common.mk +include $(TOP_DIR)/protocol/pjrc.mk +include $(TOP_DIR)/protocol.mk +include $(TOP_DIR)/common.mk +include $(TOP_DIR)/rules.mk diff --git a/terminal_usb/Makefile.102_pjrc b/terminal_usb/Makefile.102_pjrc index c1fd397f6c02381dcf5803e269d0ec3461e8d13f..a02877acfec26affe0053a5481b0826be5310f5a 100644 --- a/terminal_usb/Makefile.102_pjrc +++ b/terminal_usb/Makefile.102_pjrc @@ -7,7 +7,7 @@ TARGET = terminal_usb_102_pjrc # Directory common source filess exist -COMMON_DIR = .. +TOP_DIR = .. # Directory keyboard dependent files exist TARGET_DIR = . @@ -52,5 +52,7 @@ PROGRAM_CMD = teensy_loader_cli -mmcu=$(MCU) -w -v $(TARGET).hex -include $(COMMON_DIR)/pjrc.mk -include $(COMMON_DIR)/common.mk +include $(TOP_DIR)/protocol/pjrc.mk +include $(TOP_DIR)/protocol.mk +include $(TOP_DIR)/common.mk +include $(TOP_DIR)/rules.mk diff --git a/terminal_usb/Makefile.122_pjrc b/terminal_usb/Makefile.122_pjrc index b91e484ff2a4391e15ce0f74af65c6426c6bad6a..1f21d4e6cad02481495b0f348f03c1a30db694b6 100644 --- a/terminal_usb/Makefile.122_pjrc +++ b/terminal_usb/Makefile.122_pjrc @@ -7,7 +7,7 @@ TARGET = terminal_usb_122_pjrc # Directory common source filess exist -COMMON_DIR = .. +TOP_DIR = .. # Directory keyboard dependent files exist TARGET_DIR = . @@ -52,5 +52,7 @@ PROGRAM_CMD = teensy_loader_cli -mmcu=$(MCU) -w -v $(TARGET).hex -include $(COMMON_DIR)/pjrc.mk -include $(COMMON_DIR)/common.mk +include $(TOP_DIR)/protocol/pjrc.mk +include $(TOP_DIR)/protocol.mk +include $(TOP_DIR)/common.mk +include $(TOP_DIR)/rules.mk diff --git a/x68k_usb/Makefile b/x68k_usb/Makefile index c4b9b221b0b8a2f7c09cf1c4768f2231caf1c1f8..0127c0bf8409b9f8615c0adb1580f19c19e35d26 100644 --- a/x68k_usb/Makefile +++ b/x68k_usb/Makefile @@ -7,7 +7,7 @@ TARGET = x68k_usb_pjrc # Directory common source filess exist -COMMON_DIR = .. +TOP_DIR = .. # Directory keyboard dependent files exist TARGET_DIR = . @@ -81,5 +81,7 @@ PROGRAM_CMD = dfu-programmer atmega32u4 flash $(TARGET).hex -include $(COMMON_DIR)/pjrc.mk -include $(COMMON_DIR)/common.mk +include $(TOP_DIR)/protocol/pjrc.mk +include $(TOP_DIR)/protocol.mk +include $(TOP_DIR)/common.mk +include $(TOP_DIR)/rules.mk