diff options
| author | Max Mahn <mahn.maxwell@proton.me> | 2026-05-20 09:23:50 -0400 |
|---|---|---|
| committer | Max Mahn <mahn.maxwell@proton.me> | 2026-05-20 09:23:50 -0400 |
| commit | 137e4ed9d74891349de1b0da1e0cf2653ea92c5e (patch) | |
| tree | 29f913c45c081ec52269362eb2ce7f6f18d09070 /def/skel/c | |
initial commit
Diffstat (limited to 'def/skel/c')
| -rw-r--r-- | def/skel/c/.setup.sh | 3 | ||||
| -rw-r--r-- | def/skel/c/Makefile | 34 | ||||
| -rw-r--r-- | def/skel/c/bin/.null | 0 | ||||
| -rw-r--r-- | def/skel/c/config.mk | 16 | ||||
| -rw-r--r-- | def/skel/c/inc/.null | 0 | ||||
| -rw-r--r-- | def/skel/c/obj/.null | 0 | ||||
| -rw-r--r-- | def/skel/c/res/.null | 0 | ||||
| -rw-r--r-- | def/skel/c/src/.null | 0 | ||||
| -rw-r--r-- | def/skel/c/src/main.c | 8 |
9 files changed, 61 insertions, 0 deletions
diff --git a/def/skel/c/.setup.sh b/def/skel/c/.setup.sh new file mode 100644 index 0000000..5a3c82a --- /dev/null +++ b/def/skel/c/.setup.sh @@ -0,0 +1,3 @@ + +echo -n "\nNAME = $(basename $(pwd))\n" >> config.mk + diff --git a/def/skel/c/Makefile b/def/skel/c/Makefile new file mode 100644 index 0000000..42d9f6d --- /dev/null +++ b/def/skel/c/Makefile @@ -0,0 +1,34 @@ +# see LICENSE file for license information # + +.PHONY: default clean install uninstall + +include config.mk + +SRC ?= src +INC ?= inc +RES ?= res +OBJ ?= obj +BIN ?= bin + +NAME ?= out + +default : $(BIN)/$(NAME) + +clean : + @mkdir -p $(SRC) $(INC) $(OBJ) $(BIN) + rm -f $(OBJ)/*.o $(BIN)/* + +install : $(BIN)/$(NAME) + @cp $< $(INSTALL_DIR)/ + +uninstall : + @rm $(INSTALL_DIR)/$(NAME) + +$(BIN)/$(NAME) : $(COMPONENTS:%=$(OBJ)/%.o) + @mkdir -p $(BIN) + $(CC) $(LDFLAGS) $^ -o $@ + +$(OBJ)/%.o : $(SRC)/%.c + @mkdir -p $(OBJ) + $(CC) $(CFLAGS) $< -o $@ + diff --git a/def/skel/c/bin/.null b/def/skel/c/bin/.null new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/def/skel/c/bin/.null diff --git a/def/skel/c/config.mk b/def/skel/c/config.mk new file mode 100644 index 0000000..7a78dd6 --- /dev/null +++ b/def/skel/c/config.mk @@ -0,0 +1,16 @@ +# see LICENSE file for license information # + +COMPONENTS = main + +SRC := src +INC := inc +RES := res +OBJ := obj +BIN := bin + +INSTALL_DIR = /usr/bin + +CC = gcc +CFLAGS = -c -g -Wall -iquote ./$(INC) +LDFLAGS = + diff --git a/def/skel/c/inc/.null b/def/skel/c/inc/.null new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/def/skel/c/inc/.null diff --git a/def/skel/c/obj/.null b/def/skel/c/obj/.null new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/def/skel/c/obj/.null diff --git a/def/skel/c/res/.null b/def/skel/c/res/.null new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/def/skel/c/res/.null diff --git a/def/skel/c/src/.null b/def/skel/c/src/.null new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/def/skel/c/src/.null diff --git a/def/skel/c/src/main.c b/def/skel/c/src/main.c new file mode 100644 index 0000000..494e6d9 --- /dev/null +++ b/def/skel/c/src/main.c @@ -0,0 +1,8 @@ + +#include<stdio.h> + +int main(int argc, char *argv[]) +{ + return 0; +} + |
