Add Makefiles

parent 580775ad
.POSIX:
CXXFLAGS ?= -mcpu=native -ggdb
all: libparcel.a libparcel.so
libparcel.a: Package.o Repository.o
$(AR) rcs libparcel.a Package.o Repository.o
libparcel.so: Package.o Repository.o
$(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -o libparcel.so.0 Package.o Repository.o
ln -s libparcel.so.0 libparcel.so
Package.o: Package.cc Package.hh
$(CXX) $(CXXFLAGS) -c -o Package.o Package.cc
Repository.o: Repository.cc Repository.hh Package.hh
$(CXX) $(CXXFLAGS) -c -o Repository.o Repository.cc
clean:
rm libparcel.a
rm libparcel.so*
rm Package.o
rm Repository.o
check: libparcel.so
make -C test
.POSIX:
all: packageversion repository
packageversion: packageversion.cc
$(CXX) $(CXXFLAGS) -o packageversion packageversion.cc -L.. -lparcel
repository: repository.cc
$(CXX) $(CXXFLAGS) -o repository repository.cc -L.. -Wl,-rpath .. -lparcel
clean:
rm packageversion
rm repository
check: all
./packageversion
./repository
@echo "All tests passed."
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment