Skip to content

Commit

Permalink
Merge pull request #2 from Tak/linux
Browse files Browse the repository at this point in the history
Add Linux support
  • Loading branch information
aras-p committed Sep 6, 2016
2 parents 039c0a7 + 8a07f99 commit 3640043
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 0 deletions.
41 changes: 41 additions & 0 deletions projects/Makefile
@@ -0,0 +1,41 @@
CC=gcc
CXX=g++

INCLUDES=-Itesting/external/zstd -Itesting/external/zstd/common
CFLAGS=$(INCLUDES) -O2
CXXFLAGS=$(CFLAGS) -std=c++11

C_SRCS=testing/external/lz4/lz4.c \
testing/external/lz4/lz4hc.c \
testing/external/miniz/miniz.c \
testing/external/zstd/common/entropy_common.c \
testing/external/zstd/common/fse_decompress.c \
testing/external/zstd/common/xxhash.c \
testing/external/zstd/common/zstd_common.c \
testing/external/zstd/compress/fse_compress.c \
testing/external/zstd/compress/huf_compress.c \
testing/external/zstd/compress/zbuff_compress.c \
testing/external/zstd/compress/zstd_compress.c

CPP_SRCS=source/smolv.cpp \
testing/external/glslang/SPIRV/doc.cpp \
testing/external/glslang/SPIRV/SPVRemapper.cpp \
testing/testmain.cpp

C_OBJS=$(C_SRCS:.c=.o)
CPP_OBJS=$(CPP_SRCS:.cpp=.o)

all: smolv

clean:
rm -f smolv $(C_OBJS) $(CPP_OBJS)

smolv: $(C_OBJS) $(CPP_OBJS)
$(CXX) -o $@ $(C_OBJS) $(CPP_OBJS)

.c.o:
$(CC) $(CFLAGS) -o $@ -c $<

.cpp.o:
$(CXX) $(CXXFLAGS) -o $@ -c $<

2 changes: 2 additions & 0 deletions source/smolv.cpp
Expand Up @@ -6,6 +6,8 @@
#include <stdint.h>
#include <vector>
#include <algorithm>
#include <cstdio>
#include <cstring>

#define _SMOLV_ARRAY_SIZE(a) (sizeof(a)/sizeof((a)[0]))

Expand Down
1 change: 1 addition & 0 deletions source/smolv.h
Expand Up @@ -55,6 +55,7 @@

#include <stdint.h>
#include <vector>
#include <cstddef>

namespace smolv
{
Expand Down

0 comments on commit 3640043

Please sign in to comment.