mirror of
https://github.com/nishiowo/nishbox
synced 2025-04-21 20:24:39 +00:00
some files
This commit is contained in:
parent
ec8a9c7474
commit
0225164498
4
.gitignore
vendored
Normal file
4
.gitignore
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
*.o
|
||||
*.exe
|
||||
*.a
|
||||
/src/nishbox
|
27
Makefile
Normal file
27
Makefile
Normal 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
10
common.mk
Normal 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
7
engine/Makefile
Normal file
@ -0,0 +1,7 @@
|
||||
TARGET = libnishbox.a
|
||||
OBJS =
|
||||
|
||||
include ../common.mk
|
||||
|
||||
$(TARGET): $(OBJS)
|
||||
$(AR) rcs $@ $(OBJS)
|
7
src/Makefile
Normal file
7
src/Makefile
Normal 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
5
src/main.c
Normal file
@ -0,0 +1,5 @@
|
||||
#include <stdio.h>
|
||||
|
||||
int main(int argc, char** argv){
|
||||
return 0;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user