Skip to content

Commit 2d9430a

Browse files
committed
Translate back to C.
No difference in executable size.
1 parent f6ae535 commit 2d9430a

File tree

3 files changed

+87
-98
lines changed

3 files changed

+87
-98
lines changed

Makefile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,22 @@ prefix = /usr/local
55
bindir = $(prefix)/bin
66

77
PROG = muonsocks
8-
C_SRCS = $(sort nk/privs.c)
9-
CXX_SRCS = $(sort main.cc)
8+
C_SRCS = $(sort nk/privs.c main.c)
109
OBJS = $(C_SRCS:.c=.o) $(CXX_SRCS:.cc=.o)
1110
DEPS = $(C_SRCS:.c=.d) $(CXX_SRCS:.cc=.d)
1211

1312
CFLAGS = -MMD -O2 -s -std=c17 -I. -Wall -pedantic -Wextra -Wformat=2 -Wformat-nonliteral -Wformat-security -Wstrict-overflow=5 -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700 -D_GNU_SOURCE
14-
CXXFLAGS = -MMD -O2 -s -std=gnu++20 -fno-rtti -fno-exceptions -I. -Wall -pedantic -Wextra -Wformat=2 -Wformat-nonliteral -Wformat-security -Wstrict-overflow=5 -Wold-style-cast -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700 -D_GNU_SOURCE
1513
CPPFLAGS += $(INC)
1614

1715
#CFLAGS += -fsanitize=undefined
18-
#CXXFLAGS += -fsanitize=undefined
1916
#LDFLAGS += -fsanitize=undefined
2017

2118
-include config.mak
2219

2320
all: $(PROG)
2421

2522
$(PROG): $(OBJS)
26-
$(CXX) $(CXXFLAGS) $(LDFLAGS) -nodefaultlibs -lgcc -lc -lpthread -o $@ $^
23+
$(CC) $(CFLAGS) $(LDFLAGS) -nodefaultlibs -lgcc -lc -lpthread -o $@ $^
2724

2825
-include $(DEPS)
2926

0 commit comments

Comments
 (0)