Skip to content

Commit

Permalink
Merge pull request #7 from hrishibawane/integration
Browse files Browse the repository at this point in the history
Added make for test
  • Loading branch information
hrishibawane committed Dec 18, 2020
2 parents 5e28e17 + 88cb4f8 commit b3e5716
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
*.csv
*.o
test/tread_csv
test/tto_csv
*.out
test/test_csv
cscope.out
tags
23 changes: 17 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
all: build
CXX = g++
CXXFLAGS = -g -Wall
LIBFLAGS = -lcsv
TESTFLAGS = -lcppunit
TESTM = test/test_csv.cpp
SRCM = src/csv.cpp
LIBM = libcsv.a

all: test build

test:
$(CXX) $(CXXFLAGS) $(TESTM) -o test_csv $(LIBFLAGS) $(TESTFLAGS)

build:
g++ src/csv.cpp -c
ar rcs libcsv.a csv.o
rm /lib/libcsv.a
$(CXX) $(SRCM) -c
ar rcs $(LIBM) csv.o
rm /lib/$(LIBM)
rm *.o
chmod 777 libcsv.a
mv libcsv.a /lib/
chmod 777 $(LIBM)
mv $(LIBM) /lib/

0 comments on commit b3e5716

Please sign in to comment.