blob: b8863b69892ab747a9b46907d975221fe4dfafad (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
#ARCH = arm
MAKE = make
#CC = arm-linux-gcc
#AR = arm-linux-ar
CC = gcc
AR = ar
RM = rm
MV = mv
ECHO = echo
CFLAGS = -g -Wall
PROGS = libdriver.a
OBJECTS = core_configurator/CoreConfigurator.o core_simulator/CoreConfigSimulator.o nmi_driver_interface/host_interface.o transport/Packet_tx_Rx_socket.o core_simulator/FIFO_Buffer.o transport/Packet_Tx_Rx.o
PWD = $(shell pwd)
OBJDIR = $(PWD)
OSPWD = $(PWD)/../NMI_OsWrapper
INCHDR += -I$(PWD)/include -I .
INCHDR += -I$(OSPWD)/include
#INCHDR += -DNMI_LINUX -I$(PWD)/../NMI_OsWrapper/include
INCHDR += -DNMI_PLATFORM=NMI_LINUX -I$(PWD)/../
CFLAGS += -DSIMULATION_SHARED_SOCKET
OSMAKEFILE = $(PWD)/../NMI_OsWrapper/source/linux
OSLIB = $(PWD)/../NMI_OsWrapper/binary/linux/x86
VPATH = $(OBJDIR)
VPATH += source
$(OBJDIR)/%.o : %.c
$(MAKE) -C $(OSPWD)/source/linux
@$(ECHO) "###########################################"
@$(ECHO) "#### Building" $<
$(CC) $(INCHDR) $(CFLAGS) -c $< -o $@ #-L$(OSLIB) -loswrapper
OBJPROG = $(addprefix $(OBJDIR)/, $(PROGS))
$(OBJPROG): $(addprefix $(OBJDIR)/, $(OBJECTS))
@$(ECHO) "###########################################"
@$(ECHO) "#### Linking library" $@
$(AR) rcs $@ $^
all:build
Debug:build
Release:build
cleanDebug:clean
cleanRelease:clean
clean:
$(RM) -f $(OBJPROG) $(addprefix $(OBJDIR)/, $(OBJECTS))
build: $(OBJPROG)
|