dedit
a tool for Teeworlds demo file shenanigens
git clone https://jhhm.no/repos/dedit.git
dedit/Makefile
get raw file: Makefile
1# This file is part of dedit - a tool for editing Teeworlds/DDNet demo files 2# Copyright (C) 2024, 2026 JHHM 3# 4# Dedit is free software: you can redistribute it and/or modify 5# it under the terms of the GNU General Public License as published by 6# the Free Software Foundation, either version 3 of the License, or 7# (at your option) any later version. 8# 9# Dedit is distributed in the hope that it will be useful, 10# but WITHOUT ANY WARRANTY; without even the implied warranty of 11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12# GNU General Public License for more details. 13# 14# You should have received a copy of the GNU General Public License 15# along with dedit. If not, see <https://www.gnu.org/licenses/>. 16 17.POSIX: 18 19CC = c99 20CFLAGS = -O2 -Wall -Wextra -pedantic-errors 21CPPFLAGS = -Iinclude 22 23TARGET = dedit 24OBJDIR = obj 25 26SRC = \ 27 src/args.c \ 28 src/chat.c \ 29 src/commands.c \ 30 src/demo.c \ 31 src/huffman.c \ 32 src/main.c \ 33 src/pack.c \ 34 src/snap.c \ 35 src/merge.c 36 37OBJ = \ 38 obj/args.o \ 39 obj/chat.o \ 40 obj/commands.o \ 41 obj/demo.o \ 42 obj/huffman.o \ 43 obj/main.o \ 44 obj/pack.o \ 45 obj/snap.o \ 46 obj/merge.o 47 48all: $(OBJDIR) $(TARGET) 49 50$(TARGET): $(OBJ) 51 $(CC) $(CFLAGS) $(OBJ) -o $@ 52 53clean: 54 rm -rf $(OBJDIR) $(TARGET) 55 56format: 57 clang-format -i --style=Microsoft src/*.c 58 clang-format -i --style=Microsoft inc/*.h 59 60$(OBJDIR): 61 mkdir -p $(OBJDIR) 62 63obj/args.o: src/args.c 64 $(CC) $(CPPFLAGS) $(CFLAGS) -c src/args.c -o obj/args.o 65 66obj/chat.o: src/chat.c 67 $(CC) $(CPPFLAGS) $(CFLAGS) -c src/chat.c -o obj/chat.o 68 69obj/commands.o: src/commands.c 70 $(CC) $(CPPFLAGS) $(CFLAGS) -c src/commands.c -o obj/commands.o 71 72obj/demo.o: src/demo.c 73 $(CC) $(CPPFLAGS) $(CFLAGS) -c src/demo.c -o obj/demo.o 74 75obj/huffman.o: src/huffman.c 76 $(CC) $(CPPFLAGS) $(CFLAGS) -c src/huffman.c -o obj/huffman.o 77 78obj/main.o: src/main.c 79 $(CC) $(CPPFLAGS) $(CFLAGS) -c src/main.c -o obj/main.o 80 81obj/pack.o: src/pack.c 82 $(CC) $(CPPFLAGS) $(CFLAGS) -c src/pack.c -o obj/pack.o 83 84obj/snap.o: src/snap.c 85 $(CC) $(CPPFLAGS) $(CFLAGS) -c src/snap.c -o obj/snap.o 86 87obj/merge.o: src/merge.c 88 $(CC) $(CPPFLAGS) $(CFLAGS) -c src/merge.c -o obj/merge.o 89 90 91.PHONY: all clean format