mirror of
https://github.com/meekrosoft/fff
synced 2026-01-23 08:25:59 +01:00
Removed src base directory
This commit is contained in:
9
Makefile
9
Makefile
@@ -1,7 +1,8 @@
|
||||
all:
|
||||
cd src/test; make all
|
||||
cd src/examples; make all
|
||||
mkdir -p build
|
||||
cd test; make all
|
||||
cd examples; make all
|
||||
|
||||
clean:
|
||||
cd src/test; make clean
|
||||
cd src/examples; make clean
|
||||
cd test; make clean
|
||||
cd examples; make clean
|
||||
|
||||
@@ -1,22 +1,20 @@
|
||||
$(VERBOSE).SILENT:
|
||||
|
||||
TEMPLATE_PROGNAME = ../../build/template
|
||||
C_PROGNAME = ../../build/cmock
|
||||
CPP_PROGNAME = ../../build/cppmock
|
||||
BUILD_DIR = ../build
|
||||
TEMPLATE_PROGNAME = $(BUILD_DIR)/template
|
||||
C_PROGNAME = $(BUILD_DIR)/cmock
|
||||
CPP_PROGNAME = $(BUILD_DIR)/cppmock
|
||||
CC = gcc
|
||||
CC += -c
|
||||
CPP = g++
|
||||
CPP += -c
|
||||
LD = g++
|
||||
|
||||
ODIR = ../../build
|
||||
|
||||
C_OBJFILES = ../../build/cmocktest.o ../../build/embedded.o
|
||||
TEMPLATE_OBJFILES = ../../build/test_suite_template.o
|
||||
CPP_OBJFILES = ../../build/cppmocktest.o ../../build/embedded.o
|
||||
C_OBJFILES = $(BUILD_DIR)/cmocktest.o $(BUILD_DIR)/embedded.o
|
||||
TEMPLATE_OBJFILES = $(BUILD_DIR)/test_suite_template.o
|
||||
CPP_OBJFILES = $(BUILD_DIR)/cppmocktest.o $(BUILD_DIR)/embedded.o
|
||||
CPP_LIBS = -lgtest -lpthread -lgtest_main
|
||||
|
||||
ODIR = ../../build
|
||||
|
||||
all: $(C_PROGNAME) $(CPP_PROGNAME) $(TEMPLATE_PROGNAME)
|
||||
|
||||
@@ -24,24 +22,24 @@ all: $(C_PROGNAME) $(CPP_PROGNAME) $(TEMPLATE_PROGNAME)
|
||||
|
||||
clean:
|
||||
@echo "Cleaning object files"
|
||||
@echo " rm -f ../../build/*.o"
|
||||
rm -f ../../build/*.o
|
||||
@echo " rm -f $(BUILD_DIR)/*.o"
|
||||
rm -f $(BUILD_DIR)/*.o
|
||||
@echo "Cleaning backups"
|
||||
@echo " rm -f *~"
|
||||
rm -f *~
|
||||
@echo "Removing programs"
|
||||
@echo " rm -f "$(C_PROGNAME)
|
||||
rm -f $(C_PROGNAME)
|
||||
@echo " rm -f "$(CPP_PROGNAME)
|
||||
rm -f $(CPP_PROGNAME)
|
||||
@echo " rm -f "$(CPP_PROGNAME) $(TEMPLATE_PROGNAME)
|
||||
rm -f $(CPP_PROGNAME) $(TEMPLATE_PROGNAME)
|
||||
|
||||
|
||||
../../build/%.o: %.c
|
||||
$(BUILD_DIR)/%.o: %.c
|
||||
@echo "Compiling "$@
|
||||
@echo " CC "$<
|
||||
$(CC) -o $@ $<
|
||||
|
||||
../../build/%.o: %.cpp
|
||||
$(BUILD_DIR)/%.o: %.cpp
|
||||
@echo "Compiling "$@
|
||||
@echo " CPP "$<
|
||||
$(CPP) -I/home/mlong/tools/gtest/gtest-1.5.0/include -o $@ $<
|
||||
@@ -1,18 +1,22 @@
|
||||
|
||||
BUILD_DIR = ../build
|
||||
|
||||
CPP_SRCS += \
|
||||
fff_test.cpp
|
||||
|
||||
OBJS += \
|
||||
../../build/fff_test.o
|
||||
$(BUILD_DIR)/fff_test.o
|
||||
|
||||
LIBS := -lgtest_main -lgtest -lpthread
|
||||
|
||||
PROGNAME = $(BUILD_DIR)/fff_test
|
||||
|
||||
# All Target
|
||||
all: ../../build/fff_test
|
||||
all: $(BUILD_DIR)/fff_test
|
||||
|
||||
|
||||
# Each subdirectory must supply rules for building sources it contributes
|
||||
../../build/%.o: %.cpp
|
||||
$(BUILD_DIR)/%.o: %.cpp
|
||||
@echo 'Building file: $<'
|
||||
@echo 'Invoking: GCC C++ Compiler'
|
||||
g++ -I/home/mlong/tools/gtest/gtest-1.5.0/include -O0 -g3 -Wall -c -o"$@" "$<"
|
||||
@@ -21,15 +25,15 @@ all: ../../build/fff_test
|
||||
|
||||
|
||||
# Tool invocations
|
||||
../../build/fff_test: $(OBJS) $(USER_OBJS)
|
||||
$(PROGNAME): $(OBJS) $(USER_OBJS)
|
||||
@echo 'Building target: $@'
|
||||
@echo 'Invoking: GCC C++ Linker'
|
||||
g++ -L/home/mlong/tools/gtest -o"../../build/fff_test" $(OBJS) $(LIBS)
|
||||
g++ -L/home/mlong/tools/gtest -o"$(PROGNAME)" $(OBJS) $(LIBS)
|
||||
@echo 'Finished building target: $@'
|
||||
@echo ' '
|
||||
|
||||
# Other Targets
|
||||
clean:
|
||||
-$(RM) $(OBJS) fff_test
|
||||
-$(RM) $(OBJS) $(PROGNAME)
|
||||
-@echo ' '
|
||||
|
||||
Reference in New Issue
Block a user