etisserant@246: #! gmake etisserant@246: etisserant@246: # etisserant@246: # Copyright (C) 2006 Laurent Bessard etisserant@246: # etisserant@246: # This file is part of canfestival, a library implementing the canopen etisserant@246: # stack etisserant@246: # etisserant@246: # This library is free software; you can redistribute it and/or etisserant@246: # modify it under the terms of the GNU Lesser General Public etisserant@246: # License as published by the Free Software Foundation; either etisserant@246: # version 2.1 of the License, or (at your option) any later version. etisserant@246: # etisserant@246: # This library is distributed in the hope that it will be useful, etisserant@246: # but WITHOUT ANY WARRANTY; without even the implied warranty of etisserant@246: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU etisserant@246: # Lesser General Public License for more details. etisserant@246: # etisserant@246: # You should have received a copy of the GNU Lesser General Public etisserant@246: # License along with this library; if not, write to the Free Software etisserant@246: # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA etisserant@246: # etisserant@246: etisserant@246: CC = SUB_CC greg@329: CXX = SUB_CXX greg@329: LD = SUB_LD etisserant@246: OPT_CFLAGS = -O2 etisserant@246: CFLAGS = SUB_OPT_CFLAGS etisserant@246: PROG_CFLAGS = SUB_PROG_CFLAGS etisserant@246: EXE_CFLAGS = SUB_EXE_CFLAGS etisserant@246: OS_NAME = SUB_OS_NAME etisserant@246: ARCH_NAME = SUB_ARCH_NAME etisserant@246: PREFIX = SUB_PREFIX etisserant@246: TARGET = SUB_TARGET etisserant@246: CAN_DRIVER = SUB_CAN_DRIVER etisserant@246: TIMERS_DRIVER = SUB_TIMERS_DRIVER etisserant@246: etisserant@246: EXEC = main etisserant@246: SRCS = $(wildcard *.cpp) etisserant@246: DEPFILE = .depend etisserant@246: etisserant@246: CPP_OBJS = $(SRCS:%.cpp=%.o) etisserant@246: etisserant@246: etisserant@246: INCLUDES = -I../../include -I../../include/$(TARGET) -I../../include/$(CAN_DRIVER) -I../../include/$(TIMERS_DRIVER) etisserant@246: etisserant@246: OBJS = ObjDict.o ../../src/libcanfestival.a ../../drivers/$(TARGET)/libcanfestival_$(TARGET).a etisserant@246: etisserant@246: all: DS401_Slave_Gui etisserant@246: etisserant@246: ../../drivers/$(TARGET)/libcanfestival_$(TARGET).a: etisserant@246: $(MAKE) -C ../../drivers/$(TARGET) libcanfestival_$(TARGET).a etisserant@246: etisserant@246: etisserant@246: DS401_Slave_Gui: ObjDict.c $(OBJS) $(CPP_OBJS) greg@329: $(LD) $(CFLAGS) $(PROG_CFLAGS) ${PROGDEFINES} $(INCLUDES) $(OBJS) $(CPP_OBJS) $(EXE_CFLAGS) `wx-config --libs` -o $@ etisserant@246: %o: %c etisserant@246: $(CC) -c $(CFLAGS) $(PROG_CFLAGS) ${PROGDEFINES} $(INCLUDES) $< -o $@ etisserant@246: etisserant@246: ObjDict.c: ObjDict.od etisserant@246: $(MAKE) -C ../../objdictgen gnosis etisserant@246: python ../../objdictgen/objdictgen.py ObjDict.od ObjDict.c etisserant@246: etisserant@246: .cpp.o: greg@329: $(CXX) -c $(CFLAGS) $(PROG_CFLAGS) ${PROGDEFINES} $(INCLUDES) `wx-config --cxxflags` $< -o $@ etisserant@246: etisserant@246: clean: etisserant@246: rm -f $(MASTER_OBJS) etisserant@246: rm -f DS401_Slave_Gui etisserant@246: rm -f *~ *.o \#* etisserant@246: etisserant@246: mrproper: clean etisserant@246: rm -f ObjDict.c etisserant@246: rm -f ObjDict.h etisserant@246: $(RM) $(EXEC) $(DEPEND_FILE) etisserant@246: etisserant@246: install: DS401_Slave_Gui etisserant@246: mkdir -p $(PREFIX)/bin/ etisserant@246: cp $< $(PREFIX)/bin/ etisserant@246: etisserant@246: uninstall: etisserant@246: rm -f $(PREFIX)/bin/DS401_Slave_Gui etisserant@246: etisserant@246: $(EXEC): $(OBJS) greg@329: $(LD) $(OBJS) `wx-config --libs` -o $(EXEC) etisserant@246: etisserant@246: -include $(DEPFILE) etisserant@246: etisserant@246: etisserant@246: etisserant@246: etisserant@246: