author | Edouard Tisserant |
Thu, 24 Jan 2019 13:53:01 +0100 | |
changeset 808 | de1fc3261f21 |
parent 790 | 1936110171a2 |
permissions | -rw-r--r-- |
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 |
329 | 25 |
CXX = SUB_CXX |
26 |
LD = SUB_LD |
|
246
d635cfc520ee
Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff
changeset
|
27 |
OPT_CFLAGS = -O2 |
d635cfc520ee
Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff
changeset
|
28 |
CFLAGS = SUB_OPT_CFLAGS |
d635cfc520ee
Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff
changeset
|
29 |
PROG_CFLAGS = SUB_PROG_CFLAGS |
d635cfc520ee
Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff
changeset
|
30 |
EXE_CFLAGS = SUB_EXE_CFLAGS |
d635cfc520ee
Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff
changeset
|
31 |
OS_NAME = SUB_OS_NAME |
d635cfc520ee
Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff
changeset
|
32 |
ARCH_NAME = SUB_ARCH_NAME |
d635cfc520ee
Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff
changeset
|
33 |
PREFIX = SUB_PREFIX |
d635cfc520ee
Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff
changeset
|
34 |
TARGET = SUB_TARGET |
d635cfc520ee
Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff
changeset
|
35 |
CAN_DRIVER = SUB_CAN_DRIVER |
d635cfc520ee
Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff
changeset
|
36 |
TIMERS_DRIVER = SUB_TIMERS_DRIVER |
d635cfc520ee
Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff
changeset
|
37 |
|
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 |
SRCS = $(wildcard *.cpp) |
d635cfc520ee
Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff
changeset
|
40 |
DEPFILE = .depend |
d635cfc520ee
Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff
changeset
|
41 |
|
d635cfc520ee
Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff
changeset
|
42 |
CPP_OBJS = $(SRCS:%.cpp=%.o) |
d635cfc520ee
Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff
changeset
|
43 |
|
d635cfc520ee
Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff
changeset
|
44 |
|
d635cfc520ee
Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff
changeset
|
45 |
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
|
46 |
|
d635cfc520ee
Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff
changeset
|
47 |
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
|
48 |
|
d635cfc520ee
Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff
changeset
|
49 |
all: DS401_Slave_Gui |
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 |
../../drivers/$(TARGET)/libcanfestival_$(TARGET).a: |
d635cfc520ee
Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff
changeset
|
52 |
$(MAKE) -C ../../drivers/$(TARGET) libcanfestival_$(TARGET).a |
d635cfc520ee
Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff
changeset
|
53 |
|
d635cfc520ee
Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff
changeset
|
54 |
|
d635cfc520ee
Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff
changeset
|
55 |
DS401_Slave_Gui: ObjDict.c $(OBJS) $(CPP_OBJS) |
329 | 56 |
$(LD) $(CFLAGS) $(PROG_CFLAGS) ${PROGDEFINES} $(INCLUDES) $(OBJS) $(CPP_OBJS) $(EXE_CFLAGS) `wx-config --libs` -o $@ |
658
7758d60e9260
FIXED: - changed make targets from "%o: %c" to "%.o: %.c" (Patch from irc <oleg_osov>)
Christian Taedcke
parents:
454
diff
changeset
|
57 |
%.o: %.c |
246
d635cfc520ee
Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff
changeset
|
58 |
$(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
|
59 |
|
d635cfc520ee
Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff
changeset
|
60 |
ObjDict.c: ObjDict.od |
d635cfc520ee
Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff
changeset
|
61 |
$(MAKE) -C ../../objdictgen gnosis |
d635cfc520ee
Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff
changeset
|
62 |
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
|
63 |
|
d635cfc520ee
Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff
changeset
|
64 |
.cpp.o: |
329 | 65 |
$(CXX) -c $(CFLAGS) $(PROG_CFLAGS) ${PROGDEFINES} $(INCLUDES) `wx-config --cxxflags` $< -o $@ |
246
d635cfc520ee
Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff
changeset
|
66 |
|
d635cfc520ee
Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff
changeset
|
67 |
clean: |
d635cfc520ee
Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff
changeset
|
68 |
rm -f $(MASTER_OBJS) |
d635cfc520ee
Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff
changeset
|
69 |
rm -f DS401_Slave_Gui |
d635cfc520ee
Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff
changeset
|
70 |
rm -f *~ *.o \#* |
d635cfc520ee
Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff
changeset
|
71 |
|
d635cfc520ee
Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff
changeset
|
72 |
mrproper: clean |
d635cfc520ee
Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff
changeset
|
73 |
rm -f ObjDict.c |
d635cfc520ee
Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff
changeset
|
74 |
rm -f ObjDict.h |
d635cfc520ee
Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff
changeset
|
75 |
$(RM) $(EXEC) $(DEPEND_FILE) |
d635cfc520ee
Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff
changeset
|
76 |
|
d635cfc520ee
Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff
changeset
|
77 |
install: DS401_Slave_Gui |
790
1936110171a2
Honor DESTDIR in install rules
Samuel Martin <s.martin49@gmail.com>
parents:
658
diff
changeset
|
78 |
mkdir -p $(DESTDIR)$(PREFIX)/bin/ |
1936110171a2
Honor DESTDIR in install rules
Samuel Martin <s.martin49@gmail.com>
parents:
658
diff
changeset
|
79 |
cp $< $(DESTDIR)$(PREFIX)/bin/ |
246
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 |
uninstall: |
790
1936110171a2
Honor DESTDIR in install rules
Samuel Martin <s.martin49@gmail.com>
parents:
658
diff
changeset
|
82 |
rm -f $(DESTDIR)$(PREFIX)/bin/DS401_Slave_Gui |
246
d635cfc520ee
Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff
changeset
|
83 |
|
d635cfc520ee
Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff
changeset
|
84 |
$(EXEC): $(OBJS) |
329 | 85 |
$(LD) $(OBJS) `wx-config --libs` -o $(EXEC) |
246
d635cfc520ee
Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff
changeset
|
86 |
|
d635cfc520ee
Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff
changeset
|
87 |
-include $(DEPFILE) |
d635cfc520ee
Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff
changeset
|
88 |
|
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 |
|
d635cfc520ee
Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff
changeset
|
91 |
|
d635cfc520ee
Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget.
etisserant
parents:
diff
changeset
|
92 |