Last active
December 31, 2015 04:09
-
-
Save alexanderk23/7932550 to your computer and use it in GitHub Desktop.
Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UNAME := $(shell uname -s) | |
ifeq ($(UNAME),Darwin) | |
OSFLAGS=-D_OSX | |
endif | |
ifeq ($(UNAME),Linux) | |
OSFLAGS=-D_LINUX | |
endif | |
CC=gcc | |
CFLAGS=-std=gnu99 -lm -s -x c -O2 -Wall -Wno-unused -fno-optimize-sibling-calls -fno-strict-aliasing -DONLINE_JUDGE $(OSFLAGS) | |
SOURCES=my_strategy.c runner.c remote_process_client.c model/world.c platform/net.c | |
OBJS=$(SOURCES:.c=.o) | |
EXE=my_strategy | |
all: $(SOURCES) $(EXE) | |
$(EXE): $(OBJS) | |
$(CC) $(OBJS) -o $@ | |
.c.o: | |
$(CC) $(CFLAGS) -c -o $@ $< | |
clean: | |
rm -f $(EXE) $(OBJS) | |
zip: | |
zip $(EXE).zip my_strategy.c |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment