Skip to content

Commit faceec4

Browse files
authored
Merge pull request #4 from anyconnect/revert-1-master
Revert "update Makefile for crosscompile in VM"
2 parents 291079d + c8c48b0 commit faceec4

File tree

2 files changed

+6
-99
lines changed

2 files changed

+6
-99
lines changed

Makefile

Lines changed: 3 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,8 @@
11
SHELL = /bin/sh
22
.PHONY: clean
33

4-
SYSROOT :="/opt/crosstools/arm-cortex_a9-eabi-4.7-eglibc-2.18/arm-cortex_a9-linux-gnueabi/sysroot
5-
CROSSNAME := arm-cortex_a9-linux-gnueabi-
6-
7-
8-
CC = $(CROSSNAME)gcc
9-
CPP = $(CROSSNAME)g++
10-
CXX = $(CROSSNAME)g++
11-
AR = $(CROSSNAME)ar cqs
12-
AS = $(CROSSNAME)as
13-
LD = $(CROSSNAME)ld
14-
NM = $(CROSSNAME)nm
15-
RANLIB = $(CROSSNAME)ranlib
16-
OBJCOPY = $(CROSSNAME)objcopy
17-
STRIP = $(CROSSNAME)strip
18-
19-
CP = @cp -f
20-
RM = @rm -f
21-
LN = @ln -sf
22-
ECHO = @echo
23-
CTAG = @ctags -R
24-
25-
CPPFLAGS= -fPIC -g -std=c++11
4+
CC= g++
5+
CPPFLAGS= -fPIC -g
266
LDFLAGS= -shared
277

288
SOURCES = $(shell echo *.cpp)
@@ -40,34 +20,4 @@ clean:
4020
rm -f $(OBJECTS) $(TARGET)
4121

4222
$(TARGET): $(OBJECTS)
43-
$(CXX) $(CFLAGS) $(OBJECTS) -o $@ $(LDFLAGS)
44-
45-
46-
###############################################################################
47-
ifdef V
48-
ifeq ("$(origin V)", "command line")
49-
BUILD_VERBOSE = $(V)
50-
Q =
51-
endif
52-
endif
53-
54-
ifndef BUILD_VERBOSE
55-
BUILD_VERBOSE = 0
56-
Q = @
57-
endif
58-
59-
export BUILD_VERBOSE Q
60-
#########################################################################
61-
# Generic Rules
62-
#########################################################################
63-
%.o: %.c
64-
@echo "root Compiling..... [$<]"
65-
$(Q)$(CC) $(CPPFLAGS) $(CFLAGS) $(INCLUDE) -c -o $@ $<
66-
67-
%.o: %.cpp
68-
@echo "root cpp Compiling..... [$<]"
69-
$(Q)$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(INCLUDE) -c -o $@ $<
70-
71-
%.o: %.s
72-
@echo "root Compiling..... [$<]"
73-
@$(AS) $(CPPFLAGS) $(AFLAGS) $(INCLUDE) -c -o $@ $<
23+
$(CC) $(CFLAGS) $(OBJECTS) -o $@ $(LDFLAGS)

test/Makefile

Lines changed: 3 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,10 @@
1-
CPP=g++SYSROOT :="/opt/crosstools/arm-cortex_a9-eabi-4.7-eglibc-2.18/arm-cortex_a9-linux-gnueabi/sysroot
2-
CROSSNAME := arm-cortex_a9-linux-gnueabi-
3-
4-
5-
CC = $(CROSSNAME)gcc
6-
CPP = $(CROSSNAME)g++
7-
CXX = $(CROSSNAME)g++
8-
AR = $(CROSSNAME)ar cqs
9-
AS = $(CROSSNAME)as
10-
LD = $(CROSSNAME)ld
11-
NM = $(CROSSNAME)nm
12-
RANLIB = $(CROSSNAME)ranlib
13-
OBJCOPY = $(CROSSNAME)objcopy
14-
STRIP = $(CROSSNAME)strip
15-
1+
CPP=g++
162
CPPFLAGS=-I. -std=c++11 -ldl -pthread
173
DEPS = Test.h MediaService.h
184
OBJ = Test.o
195

20-
#%.o: %.cpp $(DEPS)
21-
# $(CPP) -c -o $@ $< $(CPPFLAGS)
6+
%.o: %.cpp $(DEPS)
7+
$(CPP) -c -o $@ $< $(CPPFLAGS)
228

239
TARGET = encodertest
2410

@@ -30,32 +16,3 @@ clean:
3016

3117
$(TARGET): $(OBJ)
3218
$(CPP) -o $@ $^ $(CPPFLAGS)
33-
34-
###############################################################################
35-
ifdef V
36-
ifeq ("$(origin V)", "command line")
37-
BUILD_VERBOSE = $(V)
38-
Q =
39-
endif
40-
endif
41-
42-
ifndef BUILD_VERBOSE
43-
BUILD_VERBOSE = 0
44-
Q = @
45-
endif
46-
47-
export BUILD_VERBOSE Q
48-
#########################################################################
49-
# Generic Rules
50-
#########################################################################
51-
%.o: %.c
52-
@echo "root Compiling..... [$<]"
53-
$(Q)$(CC) $(CPPFLAGS) $(CFLAGS) $(INCLUDE) -c -o $@ $<
54-
55-
%.o: %.cpp
56-
@echo "root cpp Compiling..... [$<]"
57-
$(Q)$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(INCLUDE) -c -o $@ $<
58-
59-
%.o: %.s
60-
@echo "root Compiling..... [$<]"
61-
@$(AS) $(CPPFLAGS) $(AFLAGS) $(INCLUDE) -c -o $@ $<

0 commit comments

Comments
 (0)