examples/DS401_Slave_Gui/Makefile.in
author etisserant
Fri, 21 Sep 2007 08:04:00 +0200
changeset 278 9d41c53dadac
parent 246 d635cfc520ee
child 329 7717252e3ed9
permissions -rw-r--r--
Typo in configure
246
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
     1
#! gmake
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
     2
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
     3
#
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
     4
# Copyright (C) 2006 Laurent Bessard
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
     5
# 
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
     6
# This file is part of canfestival, a library implementing the canopen
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
     7
# stack
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
     8
# 
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
     9
# This library is free software; you can redistribute it and/or
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    10
# modify it under the terms of the GNU Lesser General Public
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    11
# License as published by the Free Software Foundation; either
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    12
# version 2.1 of the License, or (at your option) any later version.
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    13
# 
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    14
# This library is distributed in the hope that it will be useful,
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    15
# but WITHOUT ANY WARRANTY; without even the implied warranty of
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    16
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    17
# Lesser General Public License for more details.
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    18
# 
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    19
# You should have received a copy of the GNU Lesser General Public
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    20
# License along with this library; if not, write to the Free Software
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    21
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    22
# 
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    23
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    24
CC = SUB_CC
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    25
OPT_CFLAGS = -O2
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    26
CFLAGS = SUB_OPT_CFLAGS
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    27
PROG_CFLAGS = SUB_PROG_CFLAGS
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    28
EXE_CFLAGS = SUB_EXE_CFLAGS
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    29
OS_NAME = SUB_OS_NAME
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    30
ARCH_NAME = SUB_ARCH_NAME
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    31
PREFIX = SUB_PREFIX
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    32
TARGET = SUB_TARGET
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    33
CAN_DRIVER = SUB_CAN_DRIVER
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    34
TIMERS_DRIVER = SUB_TIMERS_DRIVER
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    35
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    36
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    37
# Détermine le nom du fichier exécutable.
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    38
EXEC = main
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    39
# Détermine la liste des fichiers sources.
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    40
SRCS = $(wildcard *.cpp)
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    41
# Détermine le nom du fichier qui contiendra les dépendances.
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    42
DEPFILE = .depend
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    43
# Construit la liste des fichiers temporaires à partir de la liste des fichiers
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    44
# sources.
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    45
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    46
CPP_OBJS = $(SRCS:%.cpp=%.o)
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    47
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    48
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    49
INCLUDES = -I../../include -I../../include/$(TARGET) -I../../include/$(CAN_DRIVER) -I../../include/$(TIMERS_DRIVER)
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    50
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    51
OBJS = ObjDict.o ../../src/libcanfestival.a ../../drivers/$(TARGET)/libcanfestival_$(TARGET).a
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    52
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    53
ifeq ($(TIMERS_DRIVER),timers_xeno)
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    54
	PROGDEFINES = -DUSE_XENO
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    55
endif
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    56
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    57
all: DS401_Slave_Gui
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    58
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    59
../../drivers/$(TARGET)/libcanfestival_$(TARGET).a:
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    60
	$(MAKE) -C ../../drivers/$(TARGET) libcanfestival_$(TARGET).a
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    61
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    62
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    63
DS401_Slave_Gui: ObjDict.c $(OBJS) $(CPP_OBJS)
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    64
	$(CC) $(CFLAGS) $(PROG_CFLAGS) ${PROGDEFINES} $(INCLUDES) `wx-config --libs` $(OBJS) $(CPP_OBJS) $(EXE_CFLAGS) -o $@
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    65
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    66
%o: %c
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    67
	$(CC) -c $(CFLAGS) $(PROG_CFLAGS) ${PROGDEFINES} $(INCLUDES) $< -o $@
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    68
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    69
ObjDict.c: ObjDict.od
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    70
	$(MAKE) -C ../../objdictgen gnosis
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    71
	python ../../objdictgen/objdictgen.py ObjDict.od ObjDict.c
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    72
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    73
.cpp.o:
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    74
	g++ -c $(CFLAGS) $(PROG_CFLAGS) ${PROGDEFINES} $(INCLUDES) `wx-config --cxxflags` $< -o $@
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    75
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    76
clean:
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    77
	rm -f $(MASTER_OBJS)
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    78
	rm -f DS401_Slave_Gui
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    79
	rm -f *~ *.o \#*
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    80
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    81
mrproper: clean
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    82
	rm -f ObjDict.c
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    83
	rm -f ObjDict.h
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    84
	$(RM) $(EXEC) $(DEPEND_FILE)
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    85
	
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    86
install: DS401_Slave_Gui
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    87
	mkdir -p $(PREFIX)/bin/
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    88
	cp $< $(PREFIX)/bin/
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    89
	
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    90
uninstall:
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    91
	rm -f $(PREFIX)/bin/DS401_Slave_Gui
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    92
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    93
$(EXEC): $(OBJS)
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    94
	g++ $(OBJS) `wx-config --libs` -o $(EXEC)
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    95
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    96
-include $(DEPFILE)
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    97
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    98
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
    99
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
   100
d635cfc520ee Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff changeset
   101