mirror of
https://github.com/libsm64/libsm64.git
synced 2025-01-22 15:43:11 -05:00
modify makefile to detect windows or linux
This commit is contained in:
parent
9f3b7bebd3
commit
fab76290bc
1 changed files with 5 additions and 1 deletions
6
Makefile
6
Makefile
|
@ -31,6 +31,7 @@ TEST_OBJS := $(foreach file,$(TEST_SRCS),$(BUILD_DIR)/$(file:.c=.o))
|
|||
|
||||
ifeq ($(OS),Windows_NT)
|
||||
LIB_FILE := $(DIST_DIR)/sm64.dll
|
||||
TEST_FILE := $(DIST_DIR)/run-test.exe
|
||||
endif
|
||||
|
||||
DUMMY != mkdir -p $(ALL_DIRS) build/test src/decomp/mario $(DIST_DIR)/include
|
||||
|
@ -61,8 +62,11 @@ $(BUILD_DIR)/test/%.o: test/%.c
|
|||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
$(TEST_FILE): $(LIB_FILE) $(TEST_OBJS)
|
||||
ifeq ($(OS),Windows_NT)
|
||||
$(CC) -o $@ $(TEST_OBJS) $(LIB_FILE) -lglew32 -lopengl32 -lSDL2 -lSDL2main -lm
|
||||
else
|
||||
$(CC) -o $@ $(TEST_OBJS) $(LIB_FILE) -lGLEW -lGL -lSDL2 -lSDL2main -lm
|
||||
|
||||
endif
|
||||
|
||||
lib: $(LIB_FILE) $(LIB_H_FILE)
|
||||
|
||||
|
|
Loading…
Reference in a new issue