Browse Source

add .gitignore files

master
mogria 2 months ago
parent
commit
4e4aafbe68
2 changed files with 46 additions and 0 deletions
  1. +8
    -0
      .gitignore
  2. +38
    -0
      src/Makefile

+ 8
- 0
.gitignore View File

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

+ 38
- 0
src/Makefile 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)

Loading…
Cancel
Save