add .gitignore files

master
mogria 2022-07-20 11:58:23 +02:00
parent 6e3fa380e8
commit 4e4aafbe68
2 changed files with 46 additions and 0 deletions

8
.gitignore vendored Normal file
View File

@ -0,0 +1,8 @@
*.o
*.a
*.d
*.swp
*~
*.dSYM
local.conf
/test/test_hello_world

38
src/Makefile Normal file
View File

@ -0,0 +1,38 @@
# Copyright 2022, pEp Foundation
# This file is part of <project_name>
# This file may be used under the terms of the GNU General Public License version 3
# see LICENSE
include ../Makefile.conf
SOURCE=$(wildcard *.cc)
HEADERS=$(wildcard *.hh *.hxx)
OBJECTS=$(subst .cc,.o,$(SOURCE))
DEPENDS=$(subst .cc,.d,$(SOURCE))
CXXFLAGS+= -MMD -MP
ifneq ($(MAKECMDGOALS),clean)
-include $(DEPENDS)
endif
.PHONY: all install uninstall clean
.DEFAULT_GOAL := all
all: $(TARGET_STATIC)
$(TARGET_STATIC): $(OBJECTS)
$(AR) -rc $@ $^
clean:
rm -vf $(TARGET_STATIC) $(OBJECTS) $(DEPENDS)
rm -f *.d.*
install: $(TARGET_STATIC)
mkdir -p $(PREFIX)/include/pEp
mkdir -p $(PREFIX)/lib
cp -v $(HEADERS) $(PREFIX)/include/pEp/
cp -v $(TARGET_STATIC) $(PREFIX)/lib/
uninstall:
cd $(PREFIX)/include/pEp && rm -vf $(HEADERS)
cd $(PREFIX)/lib && rm -vf $(TARGET_STATIC)