Compare commits
10 Commits
5ac25bf971
...
f4d5c3eba9
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f4d5c3eba9 | ||
|
|
179152cf5b | ||
|
|
c75ed48cc6 | ||
|
|
652828c29d | ||
|
|
0de00b46fb | ||
|
|
eaaca7b281 | ||
|
|
611ed74150 | ||
|
|
1848235551 | ||
|
|
80b550e6ec | ||
|
|
8bfba44ede |
5
.gitignore
vendored
Normal file
5
.gitignore
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
a.out
|
||||
example
|
||||
*.swp
|
||||
*.o
|
||||
*.d
|
||||
8
LICENSE
Normal file
8
LICENSE
Normal file
@ -0,0 +1,8 @@
|
||||
The MIT License (MIT)
|
||||
Copyright © 2025 Stephan Rehfeld
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
30
Makefile
30
Makefile
@ -1,7 +1,29 @@
|
||||
example: main.c
|
||||
cc main.c -o example
|
||||
PROJECT = example
|
||||
|
||||
.PHONY: clean
|
||||
CFLAGS += -Wall -Wextra -pedantic -Werror -std=c23
|
||||
|
||||
# For Debug Build
|
||||
CFLAGS += -g -O0
|
||||
|
||||
# For Release Build
|
||||
#CFLAGS += -O3 -DNDEBUG
|
||||
|
||||
SOURCES = $(wildcard *.c)
|
||||
OBJECTS = $(SOURCES:.c=.o)
|
||||
DEPENDS = $(SOURCES:.c=.d)
|
||||
DEPFLAGS = -MMD -MP
|
||||
|
||||
$(PROJECT): $(OBJECTS)
|
||||
$(CC) $(OBJECTS) -o $@
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CFLAGS) $(DEPFLAGS) -c $< -o $@
|
||||
|
||||
-include $(DEPENDS)
|
||||
|
||||
.PHONY: clean all
|
||||
|
||||
all: $(PROJECT)
|
||||
|
||||
clean:
|
||||
rm -f example
|
||||
rm -f $(PROJECT) $(OBJECTS) $(DEPENDS)
|
||||
|
||||
7
bar.c
Normal file
7
bar.c
Normal file
@ -0,0 +1,7 @@
|
||||
#include "bar.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
void bar(void) {
|
||||
puts("Hello World from bar().");
|
||||
}
|
||||
7
foo.c
Normal file
7
foo.c
Normal file
@ -0,0 +1,7 @@
|
||||
#include "foo.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
void foo(void) {
|
||||
puts("Hello World from foo().");
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user