Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions btn/c/.gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
btn
btn.exe
btn.o

.dat
*.o
*.d

.dat
44 changes: 35 additions & 9 deletions btn/c/Makefile
Original file line number Diff line number Diff line change
@@ -1,15 +1,41 @@
CC = gcc
CCFLAGS = -O -Wall -W -pedantic
## Variables ##
TARGET := btn

TARGET = btn
CC := gcc
CFLAGS := -O -Wall -W -pedantic
CFLAGS += -g
CFLAGS += -MMD -MP
CPPFLAGS = \
-I $(DIR_LIB) \
-DPROGNAME='"$(TARGET)"'

SOURCES = $(wildcard ./*.c)
OBJECTS = $(patsubst %.c, %.o, $(SOURCES))
SOURCES = $(wildcard *.c)
LIB_SRCS = $(wildcard $(DIR_LIB)/*.c)
OBJECTS = $(SOURCES:.c=.o)
LIB_OBJS = $(notdir $(LIB_SRCS:.c=.o))

DIR_LIB := ../../lib

## Targets ##
.PHONY: all clean

## Default Goal ##
all: $(TARGET)

$(TARGET): $(OBJECTS)
$(CC) $(CCFLAGS) -o $@ $^
## Build ##
$(TARGET): $(OBJECTS) $(LIB_OBJS)
$(CC) $^ $(CFLAGS) -o $@

$(OBJECTS): %.o: %.c
$(CC) $< $(CPPFLAGS) $(CFLAGS) -c -o $@

$(LIB_OBJS): %.o: $(DIR_LIB)/%.c
$(CC) $< $(CPPFLAGS) $(CFLAGS) -c -o $@

## Dependency ##
-include $(OBJECTS:.o=.d)
-include $(LIB_OBJS:.o=.d)

%.o: %.c
$(CC) $(CCFLAGS) -c -o $@ $<
## Tasks ##
clean:
rm -f $(TARGET) *.o *.d
7 changes: 5 additions & 2 deletions hd/c/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
tmp
hd
hd.exe
hd.o

*.o
*.d

tmp
44 changes: 35 additions & 9 deletions hd/c/Makefile
Original file line number Diff line number Diff line change
@@ -1,15 +1,41 @@
CC = gcc
CCFLAGS = -O -Wall -W -pedantic
## Variables ##
TARGET := hd

TARGET = hd
CC := gcc
CFLAGS := -O -Wall -W -pedantic
CFLAGS += -g
CFLAGS += -MMD -MP
CPPFLAGS = \
-I $(DIR_LIB) \
-DPROGNAME='"$(TARGET)"'

SOURCES = $(wildcard ./*.c)
OBJECTS = $(patsubst %.c, %.o, $(SOURCES))
SOURCES = $(wildcard *.c)
LIB_SRCS = $(wildcard $(DIR_LIB)/*.c)
OBJECTS = $(SOURCES:.c=.o)
LIB_OBJS = $(notdir $(LIB_SRCS:.c=.o))

DIR_LIB := ../../lib

## Targets ##
.PHONY: all clean

## Default Goal ##
all: $(TARGET)

$(TARGET): $(OBJECTS)
$(CC) $(CCFLAGS) -o $@ $^
## Build ##
$(TARGET): $(OBJECTS) $(LIB_OBJS)
$(CC) $^ $(CFLAGS) -o $@

$(OBJECTS): %.o: %.c
$(CC) $< $(CPPFLAGS) $(CFLAGS) -c -o $@

$(LIB_OBJS): %.o: $(DIR_LIB)/%.c
$(CC) $< $(CPPFLAGS) $(CFLAGS) -c -o $@

## Dependency ##
-include $(OBJECTS:.o=.d)
-include $(LIB_OBJS:.o=.d)

%.o: %.c
$(CC) $(CCFLAGS) -c -o $@ $<
## Tasks ##
clean:
rm -f $(TARGET) *.o *.d
1 change: 1 addition & 0 deletions hhss/c/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
hhss
hhss.exe

*.o
*.d
6 changes: 4 additions & 2 deletions nsy/c/.gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
nsy
nsy.exe
nsy.o

.dat
*.o
*.d

.dat
44 changes: 35 additions & 9 deletions nsy/c/Makefile
Original file line number Diff line number Diff line change
@@ -1,15 +1,41 @@
CC = gcc
CCFLAGS = -O -Wall -W -pedantic
## Variables ##
TARGET := nsy

TARGET = nsy
CC := gcc
CFLAGS := -O -Wall -W -pedantic
CFLAGS += -g
CFLAGS += -MMD -MP
CPPFLAGS = \
-I $(DIR_LIB) \
-DPROGNAME='"$(TARGET)"'

SOURCES = $(wildcard ./*.c)
OBJECTS = $(patsubst %.c, %.o, $(SOURCES))
SOURCES = $(wildcard *.c)
LIB_SRCS = $(wildcard $(DIR_LIB)/*.c)
OBJECTS = $(SOURCES:.c=.o)
LIB_OBJS = $(notdir $(LIB_SRCS:.c=.o))

DIR_LIB := ../../lib

## Targets ##
.PHONY: all clean

## Default Goal ##
all: $(TARGET)

$(TARGET): $(OBJECTS)
$(CC) $(CCFLAGS) -o $@ $^
## Build ##
$(TARGET): $(OBJECTS) $(LIB_OBJS)
$(CC) $^ $(CFLAGS) -o $@

$(OBJECTS): %.o: %.c
$(CC) $< $(CPPFLAGS) $(CFLAGS) -c -o $@

$(LIB_OBJS): %.o: $(DIR_LIB)/%.c
$(CC) $< $(CPPFLAGS) $(CFLAGS) -c -o $@

## Dependency ##
-include $(OBJECTS:.o=.d)
-include $(LIB_OBJS:.o=.d)

%.o: %.c
$(CC) $(CCFLAGS) -c -o $@ $<
## Tasks ##
clean:
rm -f $(TARGET) *.o *.d
5 changes: 4 additions & 1 deletion nsy2/c/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
nsy2
nsy2.o
nsy2.exe

*.o
*.d
44 changes: 35 additions & 9 deletions nsy2/c/Makefile
Original file line number Diff line number Diff line change
@@ -1,15 +1,41 @@
CC = gcc
CCFLAGS = -O -Wall -W -pedantic
## Variables ##
TARGET := nsy2

TARGET = nsy2
CC := gcc
CFLAGS := -O -Wall -W -pedantic
CFLAGS += -g
CFLAGS += -MMD -MP
CPPFLAGS = \
-I $(DIR_LIB) \
-DPROGNAME='"$(TARGET)"'

SOURCES = $(wildcard ./*.c)
OBJECTS = $(patsubst %.c, %.o, $(SOURCES))
SOURCES = $(wildcard *.c)
LIB_SRCS = $(wildcard $(DIR_LIB)/*.c)
OBJECTS = $(SOURCES:.c=.o)
LIB_OBJS = $(notdir $(LIB_SRCS:.c=.o))

DIR_LIB := ../../lib

## Targets ##
.PHONY: all clean

## Default Goal ##
all: $(TARGET)

$(TARGET): $(OBJECTS)
$(CC) $(CCFLAGS) -o $@ $^
## Build ##
$(TARGET): $(OBJECTS) $(LIB_OBJS)
$(CC) $^ $(CFLAGS) -o $@

$(OBJECTS): %.o: %.c
$(CC) $< $(CPPFLAGS) $(CFLAGS) -c -o $@

$(LIB_OBJS): %.o: $(DIR_LIB)/%.c
$(CC) $< $(CPPFLAGS) $(CFLAGS) -c -o $@

## Dependency ##
-include $(OBJECTS:.o=.d)
-include $(LIB_OBJS:.o=.d)

%.o: %.c
$(CC) $(CCFLAGS) -c -o $@ $<
## Tasks ##
clean:
rm -f $(TARGET) *.o *.d
3 changes: 2 additions & 1 deletion test/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
test
test_maker
test_maker.o

*.o
1 change: 1 addition & 0 deletions yandere/c/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
yandere
yandere.exe

*.o
*.d
Loading