# Makefile for cygwin under windows by WuN # Please e-mail any comments/sugjestions to wolever@ftml.net # # With changes by Asumu Takikawa to work with wine under Linux # # Make sure you have scripts for mcc18, cpp18 and mplink in mcc18 # Have mcc18 tools in your source directory MCC18_BASE=C:\\mcc18 MCC18_BIN=$(MCC18_BASE)\\bin MCC18=mcc18.exe CFLAGS=-D_FRC_BOARD -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa- #LINKER=_mplink.exe LINKER=_mplink.exe IFILOAD=picloader # You gotta have the two \\ or the shell thinks they are escape codes LIB_PATH=$(MCC18_BASE)\\lib INCLUDE_PATH=$(MCC18_BASE)\\h # Make these objects OBJS= main.o user_routines_fast.o user_routines.o ifi_utilities.o ifi_startup.o user_SerialDrv.o camera.o encoder.o serial_ports.o tracking.o #PIC=18F8520 PIC=18F8722 #load: FrcCode.hex # $(IFILOAD) & all: 8722 make: 8722 clean: -rm *.o -rm *.i -rm *.err -rm *.cof -rm *.hex 8722: $(OBJS) $(MCC18_BIN)\\$(LINKER) /l"$(LIB_PATH)" "18f8722.lkr" $(OBJS) FRC_library_8722.lib /m"FrcCode.map" /o"FrcCode.cof" 8520: $(OBJS) $(MCC18_BIN)\\$(LINKER) /l"$(LIB_PATH)" "18f8520.lkr" $(OBJS) FRC_library_8520.lib /m"FrcCode.map" /o"FrcCode.cof" $(OBJS): $(MCC18_BIN)\\$(MCC18) -p=$(PIC) $(patsubst %.o,%.c,$(@)) -fo="$(@)" -I="$(INCLUDE_PATH)" $(CFLAGS)