Permalink
Browse files

simplified makefile

  • Loading branch information...
1 parent 5c628cd commit fd55ce50bae321181edf191848afe03d9955c548 @TheHippo committed May 1, 2010
Showing with 11 additions and 21 deletions.
  1. +11 −21 makefile
View
@@ -1,34 +1,24 @@
NEKOPATH=/usr/lib/neko/include/
-CC=gcc
-CFLAGS=-Wall -shared -I$(NEKOPATH) -fPIC
-BINDING=-lgd
+CC = gcc
+CFLAGS = -Wall -shared -I$(NEKOPATH) -fPIC
+LDFLAGS = -lgd
-OUT=nGD.ndll
+OUT = nGD.ndll
-all: nGD src/nGDImage.o src/nGDDraw.o src/nGDFile.o src/nGD.o src/nGDCopy.o src/nGDText.o src/nGDAnim.o
- $(CC) $(CFLAGS) $(BINDING) src/nGDImage.o src/nGDDraw.o src/nGDFile.o src/nGD.o src/nGDCopy.o src/nGDText.o src/nGDAnim.o -o $(OUT)
-
-nGD: src/nGD.o nGDFile
-
-nGDFile: src/nGDFile.o nGDImage
-
-nGDDraw: src/nGDDraw.o nGDImage
-
-nGDCopy: src/nGDCopy.o nGDImage
+OBJ = src/nGD.o src/nGDFile.o src/nGDDraw.o src/nGDCopy.o src/nGDText.o src/nGDAnim.o src/nGDImage.o
-nGDText: src/nGDText.o nGDImage
-
-nGDAnim: src/nGDAnim.o nGDImage
+all: $(OBJ)
+ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) -o $(OUT)
+
+src/%.o: src/%.c
+ $(CC) $(CFLAGS) -c -o $@ $<
-nGDImage: src/nGDImage.o
+.PHONY: clean haxe run
clean:
rm -f src/*.o
-
-force:
- touch src/*.c
haxe:
haxe build.hxml

0 comments on commit fd55ce5

Please sign in to comment.