This commit is contained in:
Jun Lyu 2025-05-13 22:08:09 +02:00 committed by GitHub
commit 570575dbda
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -8,11 +8,16 @@ OS = `echo $(TARGETOS) | tr "a-z" "A-Z"`
ARCH = `uname -m` ARCH = `uname -m`
HEAD_COMMIT = `git rev-parse --short HEAD` HEAD_COMMIT = `git rev-parse --short HEAD`
ALL_OBJS = $(COMMONOBJS) $(CLIENTOBJS) $(SERVEROBJS)
DEPS = $(ALL_OBJS:.o=.d)
LIBPATH = -L. LIBPATH = -L.
LDFLAGS += -lz `sh osflags $(TARGETOS) link` $(LIBPATH) LDFLAGS += -lz `sh osflags $(TARGETOS) link` $(LIBPATH)
CFLAGS += -std=c99 -c -g -Wall -D$(OS) -pedantic `sh osflags $(TARGETOS) cflags` -DGITREVISION=\"$(HEAD_COMMIT)\" CFLAGS += -std=c99 -c -g -Wall -Isrc -D$(OS) -pedantic `sh osflags $(TARGETOS) cflags` -DGITREVISION=\"$(HEAD_COMMIT)\" -MMD
CFLAGS += -Wstrict-prototypes -Wtype-limits -Wmissing-declarations -Wmissing-prototypes CFLAGS += -Wstrict-prototypes -Wtype-limits -Wmissing-declarations -Wmissing-prototypes
-include $(DEPS)
all: stateos $(CLIENT) $(SERVER) all: stateos $(CLIENT) $(SERVER)
stateos: stateos:
@ -39,6 +44,5 @@ base64u.c: base64.c
clean: clean:
@echo "Cleaning src/" @echo "Cleaning src/"
@rm -f $(CLIENT){,.exe} $(SERVER){,.exe} *~ *.o *.core base64u.* @rm -f $(CLIENT){,.exe} $(SERVER){,.exe} *~ *.o *.core base64u.* $(DEPS)
@rm -rf obj libs #android stuff @rm -rf obj libs #android stuff