so://phie

soso

My pretty neat website
git clone git://soophie.de/soso

blob: 995e792f226e122627c0374aecc11af26419e58a (1507 bytes)[raw]

1CC := cc

2CFLAGS := -Wall -Wextra -Werror -pedantic

3CFLAGS_RELEASE := -O2 -DNDEBUG

4CFLAGS_DEBUG := -g3 -O0

5# NOTE: exposes header impls into dynamically linked modules

6LDFLAGS := -rdynamic

7LDLIBS := \

8 -lm \

9 -lssl \

10 -lgit2

11DEPS := \

12 -I$(HOME)/git/sock/src \

13 -I$(HOME)/git/tpee/src \

14 -I$(HOME)/git/tpee_ext/src \

15 -I$(HOME)/git/buf/src \

16 -I$(HOME)/git/orb/src \

17 -I$(HOME)/git/md4c/src

18SOURCE := \

19 src/main.c \

20 $(HOME)/git/md4c/src/*.c \

21 src/module/page.c \

22 src/module/default.c \

23 src/module/index.c \

24 src/module/git_list.c \

25 src/module/git_repo.c \

26 src/module/git_repo_log.c \

27 src/module/git_repo_tree.c \

28 src/module/git_repo_refs.c \

29 src/module/git_repo_commit.c \

30 src/module/git_repo_blob.c

31VALGRIND := valgrind \

32 --leak-check=full \

33 --show-leak-kinds=all \

34 --track-origins=yes

35TARGET := soso

36

37export DUC_HEADERPATH := ./src/templ/

38export DUC_BUILDPATH := ./src/templ/

39export DUC_LIBPATH := $(CFLAGS) $(DEPS)

40

41all: build

42

43build-templ:

44 mkdir -p ./src/templ

45ifdef TEMPL

46 ductape ./templ/$(TEMPL).html

47else

48 ductape ./templ/*.html

49endif

50

51build: $(SOURCE)

52 $(CC) -o $(TARGET) $(CFLAGS) $(DEPS) $(LDFLAGS) $^ $(LDLIBS)

53

54build-release: $(SOURCE)

55 $(CC) -o $(TARGET) $(CFLAGS) $(DEPS) $(CFLAGS_RELEASE) $(LDFLAGS) $^ $(LDLIBS)

56

57build-debug: $(SOURCE)

58 $(CC) -o $(TARGET) $(CFLAGS) $(DEPS) $(CFLAGS_DEBUG) $(LDFLAGS) $^ $(LDLIBS)

59

60run: build

61 ./$(TARGET)

62

63run-release: build-release

64 ./$(TARGET)

65

66run-debug: build-debug

67 $(VALGRIND) ./$(TARGET)

68

69clean:

70 rm -f ./$(TARGET)

71 rm -rf ./src/templ