some files

This commit is contained in:
NishiOwO 2025-03-26 16:52:22 +09:00
parent ec8a9c7474
commit 0225164498
No known key found for this signature in database
GPG Key ID: 27EF69B208EB9343
6 changed files with 60 additions and 0 deletions

4
.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
*.o
*.exe
*.a
/src/nishbox

27
Makefile Normal file
View File

@ -0,0 +1,27 @@
export
ODE_CFLAGS = `pkg-config --cflags ode`
ODE_LIBS = `pkg-config --libs ode`
AMX_CFLAGS = `pkg-config --cflags amx`
AMX_LIBS = `pkg-config --libs amx`
AR = $(TARGET_PREFIX)ar
CC = $(TARGET_PREFIX)gcc
CFLAGS = $(ODE_CFLAGS) $(AMX_CFLAGS)
LDFLAGS =
LIBS = $(ODE_LIBS) $(AMX_LIBS)
EXEC =
.PHONY: all clean ./engine ./src
all: ./src
./engine::
$(MAKE) -C $@
./src:: ./engine
$(MAKE) -C $@
clean:
$(MAKE) -C ./engine clean
$(MAKE) -C ./src clean

10
common.mk Normal file
View File

@ -0,0 +1,10 @@
.SUFFIXES: .c .o
.PHONY: all clean
all: $(TARGET)
.c.o:
$(CC) $(CFLAGS) -c -o $@ $<
clean:
rm -f $(TARGET) *.a *.exe *.o

7
engine/Makefile Normal file
View File

@ -0,0 +1,7 @@
TARGET = libnishbox.a
OBJS =
include ../common.mk
$(TARGET): $(OBJS)
$(AR) rcs $@ $(OBJS)

7
src/Makefile Normal file
View File

@ -0,0 +1,7 @@
TARGET = nishbox$(EXEC)
OBJS = main.o
include ../common.mk
$(TARGET): $(OBJS) ../engine/libnishbox.a
$(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS) ../engine/libnishbox.a

5
src/main.c Normal file
View File

@ -0,0 +1,5 @@
#include <stdio.h>
int main(int argc, char** argv){
return 0;
}