최종완료보고 버전

This commit is contained in:
CodeTempla
2026-05-20 03:08:08 +09:00
commit 10d255ed51
548 changed files with 435582 additions and 0 deletions
+125
View File
@@ -0,0 +1,125 @@
################################################################################
# Common settings
AR = ar
RANLIB = ranlib
CC = g++
C = gcc
PREC = cpp
LD = g++
MAKE = make
################################################################################
# OS definition
# LINUX, FREEBSD, OSX55, SOLARIS
ifndef os
os = LINUX
endif
################################################################################
# Standard Configuration
STD_CCFLAGS += -O2 -Wall -fPIC
STD_CCFLAGS += -D_REENTRANT
STD_INC += -I/usr/local/include
STD_LIBS += -L/usr/local/lib
################################################################################
# External Library Definitions
ifeq ($(os), LINUX)
OPENSSLDIR = ../external/linux/openssl-1.0.2j
else ifeq ($(os), SOLARIS)
OPENSSLDIR = ../external/solaris/openssl-1.0.2j
endif
OPENSSL_INCDIR = $(OPENSSLDIR)/include
################################################################################
# Include Definitions
INCDIR += $(STD_INC)
INCDIR += -I$(OPENSSL_INCDIR)
#ifeq ($(use_curl), true)
#INCDIR += -I../external/curl/include
#endif
################################################################################
# c++ flags Definitions
CCFLAGS += $(INCDIR)
CCFLAGS += $(STD_CCFLAGS)
################################################################################
# Library Definitions
LIBS += $(STD_LIBS)
ifeq ($(use_curl), true)
#LIBS += -L../external/curl/lib -lcurl
#LIBS += -lcurl
endif
################################################################################
# obj generation directory flags Definitions
OBJDIR = huslib
OBJDIR_PATH = ../tmp/obj/$(OBJDIR)
################################################################################
# Source file names
SOURCES = Common.cpp Config.cpp Global.cpp hsparser.cpp HttpHandler.cpp HusApp.cpp inifile.cpp Logger.cpp MultiplexSocket.cpp MultiplexSslSocket.cpp NetUtil.cpp stringex.cpp TelnetHandler.cpp TelnetServer.cpp Timer.cpp WebServer.cpp VspHandler.cpp SohHandler.cpp
ifeq ($(use_curl), true)
SOURCES += curl_manager.cpp
endif
################################################################################
# Target file names
LIB_TOOL = libhuslib.a
LIB_SHARED = libhuslib.so
OBJS := $(SOURCES:%.c=$(OBJDIR_PATH)/%.o)
OBJS := $(OBJS:%.cxx=$(OBJDIR_PATH)/%.o)
OBJS := $(OBJS:%.cpp=$(OBJDIR_PATH)/%.o)
DEPENDS := $(SOURCES:%.c=$(OBJDIR_PATH)/%.dep)
DEPENDS := $(DEPENDS:%.cxx=$(OBJDIR_PATH)/%.dep)
DEPENDS := $(DEPENDS:%.cpp=$(OBJDIR_PATH)/%.dep)
$(OBJDIR_PATH)/%.o:%.c
$(CC) $(CCFLAGS) -c -o $@ -g $<
$(OBJDIR_PATH)/%.o:%.cxx
$(CC) $(CCFLAGS) -c -o $@ -g $<
$(OBJDIR_PATH)/%.o:%.cpp
$(CC) $(CCFLAGS) -c -o $@ -g $<
$(OBJDIR_PATH)/%.dep:%.c
@mkdir -p $(OBJDIR_PATH)
$(CC) -c $(CCFLAGS) -MM $< > $@
@sed -e "s/.o:/.c:/" $@ | sed -e "s/$<:/$(OBJDIR)\/$<:/" | sed -e "s/.c:/.o:/" > $@
@rm $@
$(OBJDIR_PATH)/%.dep:%.cxx
@mkdir -p $(OBJDIR_PATH)
$(CC) -c $(CCFLAGS) -MM $< > $@
@sed -e "s/.o:/.cxx:/" $@ | sed -e "s/$<:/$(OBJDIR)\/$<:/" | sed -e "s/.cxx:/.o:/" > $@
@rm $@
$(OBJDIR_PATH)/%.dep:%.cpp
@mkdir -p $(OBJDIR_PATH)
$(CC) -c $(CCFLAGS) -MM $< > $@
@sed -e "s/.o:/.cpp:/" $@ | sed -e "s/$<:/$(OBJDIR)\/$<:/" | sed -e "s/.cpp:/.o:/" > $@
@rm $@
#all : $(LIB_TOOL) $(LIB_SHARED)
all : $(LIB_TOOL)
$(LIB_TOOL) : $(DEPENDS) $(OBJS)
$(AR) rcv $@ $(OBJS)
$(LIB_SHARED) : $(DEPENDS) $(OBJS)
$(LD) -shared -o $(LIB_SHARED) $(OBJS) $(LIBS)
clean :
rm -f $(DEPENDS) $(OBJS)
rm -f $(LIB_TOOL) $(LIB_SHARED)