adding stuff
git-svn-id: file:///raid/svn-personal/tewi/trunk@2 8739d7e6-ffea-ec47-b151-bdff447c6205
This commit is contained in:
parent
5996a671a4
commit
b7ef2d8f80
15
.clang-format
Normal file
15
.clang-format
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
---
|
||||||
|
# $Id$
|
||||||
|
Language: Cpp
|
||||||
|
UseTab: Always
|
||||||
|
TabWidth: 8
|
||||||
|
IndentWidth: 8
|
||||||
|
PointerAlignment: Left
|
||||||
|
ColumnLimit: 1024
|
||||||
|
AllowShortIfStatementsOnASingleLine: Always
|
||||||
|
AllowShortBlocksOnASingleLine: Never
|
||||||
|
AllowShortLoopsOnASingleLine: true
|
||||||
|
SpaceBeforeParens: Never
|
||||||
|
AlignEscapedNewlines: DontAlign
|
||||||
|
SortIncludes: false
|
||||||
|
AllowShortEnumsOnASingleLine: false
|
19
Common/Makefile
Normal file
19
Common/Makefile
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
# $Id$
|
||||||
|
|
||||||
|
include $(PWD)/Platform/$(PLATFORM).mk
|
||||||
|
|
||||||
|
.PHONY: all clean
|
||||||
|
.SUFFIXES: .c .o
|
||||||
|
|
||||||
|
OBJS = string.o
|
||||||
|
|
||||||
|
all: common.a
|
||||||
|
|
||||||
|
common.a: $(OBJS)
|
||||||
|
ar rcs $@ $(OBJS)
|
||||||
|
|
||||||
|
.c.o:
|
||||||
|
$(CC) $(CFLAGS) -c -o $@ $<
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f *.o *.a
|
1
Common/string.c
Normal file
1
Common/string.c
Normal file
|
@ -0,0 +1 @@
|
||||||
|
/* $Id$ */
|
24
Makefile
Normal file
24
Makefile
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
# $Id$
|
||||||
|
|
||||||
|
PWD = `pwd`
|
||||||
|
PLATFORM = generic
|
||||||
|
PREFIX = /usr
|
||||||
|
|
||||||
|
FLAGS = PWD=$(PWD) PLATFORM=$(PLATFORM) PREFIX=$(PREFIX)
|
||||||
|
|
||||||
|
.PHONY: all format clean ./Server ./Common
|
||||||
|
|
||||||
|
all: ./Server
|
||||||
|
|
||||||
|
./Server:: ./Common
|
||||||
|
$(MAKE) -C $@ $(FLAGS)
|
||||||
|
|
||||||
|
./Common::
|
||||||
|
$(MAKE) -C $@ $(FLAGS)
|
||||||
|
|
||||||
|
format:
|
||||||
|
clang-format --verbose -i `find . -name "*.c" -or -name "*.h"`
|
||||||
|
|
||||||
|
clean:
|
||||||
|
$(MAKE) -C ./Server $(FLAGS) clean
|
||||||
|
$(MAKE) -C ./Common $(FLAGS) clean
|
7
Platform/generic.mk
Normal file
7
Platform/generic.mk
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
# $Id$
|
||||||
|
|
||||||
|
CC = cc
|
||||||
|
AR = ar
|
||||||
|
CFLAGS = -g -std=c99 -DPREFIX=\"$(PREFIX)\"
|
||||||
|
LDFLAGS =
|
||||||
|
LIBS =
|
19
Server/Makefile
Normal file
19
Server/Makefile
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
# $Id$
|
||||||
|
|
||||||
|
include $(PWD)/Platform/$(PLATFORM).mk
|
||||||
|
|
||||||
|
.PHONY: all clean
|
||||||
|
.SUFFIXES: .c .o
|
||||||
|
|
||||||
|
OBJS = ../Common/common.a main.o
|
||||||
|
|
||||||
|
all: tewi$(EXEC)
|
||||||
|
|
||||||
|
tewi$(EXEC): $(OBJS)
|
||||||
|
$(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
|
||||||
|
|
||||||
|
.c.o:
|
||||||
|
$(CC) $(CFLAGS) -c -o $@ $<
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f *.o tewi *.exe
|
3
Server/main.c
Normal file
3
Server/main.c
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
/* $Id$ */
|
||||||
|
|
||||||
|
int main() {}
|
Loading…
Reference in New Issue
Block a user